From de5eb04ed014770558b546e02c91ce6eb262f652 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Wed, 28 Feb 2024 11:41:00 -0500 Subject: Fix sunwarp access --- util/generate_gamedata.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'util') diff --git a/util/generate_gamedata.rb b/util/generate_gamedata.rb index 1cce003..4c530f1 100644 --- a/util/generate_gamedata.rb +++ b/util/generate_gamedata.rb @@ -11,6 +11,7 @@ CLASSIFICATION_INSANITY = 4 panel_to_id = {} door_groups = {} +warp_groups = {} panel_output = [] door_ids_by_item_id = {} @@ -163,6 +164,11 @@ config.each do |room_name, room_data| internal_warp_ids = door["warp_id"] end + if door.include? "group" + warp_groups[door["group"]] ||= Set[] + warp_groups[door["group"]].merge(internal_warp_ids) + end + warp_ids_by_item_id[item_id] = internal_warp_ids mentioned_warps.merge(internal_warp_ids) end @@ -176,6 +182,11 @@ door_groups.each do |group_name, door_ids| door_ids_by_item_id[item_id] = door_ids.to_a end +warp_groups.each do |group_name, warp_ids| + item_id = ids_config["door_groups"][group_name] + warp_ids_by_item_id[item_id] = warp_ids.to_a +end + File.open(outputpath, "w") do |f| f.write "extends Node\n\nvar panels = [" f.write(panel_output.map do |panel| -- cgit 1.4.1