diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2024-02-28 11:41:00 -0500 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2024-02-28 11:41:00 -0500 |
commit | de5eb04ed014770558b546e02c91ce6eb262f652 (patch) | |
tree | 464913e3dd535f7f7197637847715f5c44e0fff1 /util | |
parent | c1ffc2c464df33c5effbb4a62e4bd57605d409b4 (diff) | |
download | lingo-archipelago-de5eb04ed014770558b546e02c91ce6eb262f652.tar.gz lingo-archipelago-de5eb04ed014770558b546e02c91ce6eb262f652.tar.bz2 lingo-archipelago-de5eb04ed014770558b546e02c91ce6eb262f652.zip |
Fix sunwarp access
Diffstat (limited to 'util')
-rw-r--r-- | util/generate_gamedata.rb | 11 |
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 | ||
12 | panel_to_id = {} | 12 | panel_to_id = {} |
13 | door_groups = {} | 13 | door_groups = {} |
14 | warp_groups = {} | ||
14 | 15 | ||
15 | panel_output = [] | 16 | panel_output = [] |
16 | door_ids_by_item_id = {} | 17 | door_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 |
177 | end | 183 | end |
178 | 184 | ||
185 | warp_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 | ||
188 | end | ||
189 | |||
179 | File.open(outputpath, "w") do |f| | 190 | File.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| |