about summary refs log tree commit diff stats
path: root/util/generate_gamedata.rb
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2024-02-28 11:41:00 -0500
committerStar Rauchenberger <fefferburbia@gmail.com>2024-02-28 11:41:00 -0500
commitde5eb04ed014770558b546e02c91ce6eb262f652 (patch)
tree464913e3dd535f7f7197637847715f5c44e0fff1 /util/generate_gamedata.rb
parentc1ffc2c464df33c5effbb4a62e4bd57605d409b4 (diff)
downloadlingo-archipelago-de5eb04ed014770558b546e02c91ce6eb262f652.tar.gz
lingo-archipelago-de5eb04ed014770558b546e02c91ce6eb262f652.tar.bz2
lingo-archipelago-de5eb04ed014770558b546e02c91ce6eb262f652.zip
Fix sunwarp access
Diffstat (limited to 'util/generate_gamedata.rb')
-rw-r--r--util/generate_gamedata.rb11
1 files changed, 11 insertions, 0 deletions
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
11 11
12panel_to_id = {} 12panel_to_id = {}
13door_groups = {} 13door_groups = {}
14warp_groups = {}
14 15
15panel_output = [] 16panel_output = []
16door_ids_by_item_id = {} 17door_ids_by_item_id = {}
@@ -163,6 +164,11 @@ config.each do |room_name, room_data|
163 internal_warp_ids = door["warp_id"] 164 internal_warp_ids = door["warp_id"]
164 end 165 end
165 166
167 if door.include? "group"
168 warp_groups[door["group"]] ||= Set[]
169 warp_groups[door["group"]].merge(internal_warp_ids)
170 end
171
166 warp_ids_by_item_id[item_id] = internal_warp_ids 172 warp_ids_by_item_id[item_id] = internal_warp_ids
167 mentioned_warps.merge(internal_warp_ids) 173 mentioned_warps.merge(internal_warp_ids)
168 end 174 end
@@ -176,6 +182,11 @@ door_groups.each do |group_name, door_ids|
176 door_ids_by_item_id[item_id] = door_ids.to_a 182 door_ids_by_item_id[item_id] = door_ids.to_a
177end 183end
178 184
185warp_groups.each do |group_name, warp_ids|
186 item_id = ids_config["door_groups"][group_name]
187 warp_ids_by_item_id[item_id] = warp_ids.to_a
188end
189
179File.open(outputpath, "w") do |f| 190File.open(outputpath, "w") do |f|
180 f.write "extends Node\n\nvar panels = [" 191 f.write "extends Node\n\nvar panels = ["
181 f.write(panel_output.map do |panel| 192 f.write(panel_output.map do |panel|