diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2024-07-26 04:53:11 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-26 10:53:11 +0200 |
commit | 7641d9590110fa7b4901c7f7ca0384392ef24375 (patch) | |
tree | 8efdfa5be3a88879a690a4a7351eb7b635989dc7 /utils/assign_ids.rb | |
parent | 00c16023c45301224400a06f31f637fdedba00ee (diff) | |
download | lingo-apworld-7641d9590110fa7b4901c7f7ca0384392ef24375.tar.gz lingo-apworld-7641d9590110fa7b4901c7f7ca0384392ef24375.tar.bz2 lingo-apworld-7641d9590110fa7b4901c7f7ca0384392ef24375.zip |
Lingo: Add panels mode door shuffle (#3163)
* Created panels mode door shuffle * Added some panel door item names * Remove RUNT TURN panel door Not really useful. * Fix logic with First SIX related stuff * Add group_doors to slot data * Fix LEVEL 2 behavior with panels mode * Fixed unit tests * Fixed duplicate IDs from merge * Just regenerated new IDs * Fixed duplication of color and door group items * Removed unnecessary unit test option * Fix The Seeker being achievable without entrance door * Fix The Observant being achievable without locked panels * Added some more panel doors * Added Progressive Suits Area * Lingo: Fix Basement access with THE MASTER * Added indirect conditions for MASTER-blocked entrances * Fixed Incomparable achievement access * Fix STAIRS panel logic * Fix merge error with good items * Is this clearer? * DREAD and TURN LEARN * Allow a weird edge case for reduced locations Panels mode door shuffle + grouped doors + color shuffle + pilgrimage enabled is exactly the right number of items for reduced locations. Removing color shuffle also allows for disabling pilgrimage, adding sunwarp locking, or both, with a couple of locations left over. * Prevent small sphere one on panels mode * Added shuffle_doors aliases for old options * Fixed a unit test * Updated datafile * Tweaked requirements for reduced locations * Added player name to OptionError messages * Update generated.dat
Diffstat (limited to 'utils/assign_ids.rb')
-rw-r--r-- | utils/assign_ids.rb | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/utils/assign_ids.rb b/utils/assign_ids.rb index 9e1ce67..f7de3d0 100644 --- a/utils/assign_ids.rb +++ b/utils/assign_ids.rb | |||
@@ -73,6 +73,22 @@ if old_generated.include? "door_groups" then | |||
73 | end | 73 | end |
74 | end | 74 | end |
75 | end | 75 | end |
76 | if old_generated.include? "panel_doors" then | ||
77 | old_generated["panel_doors"].each do |room, panel_doors| | ||
78 | panel_doors.each do |name, id| | ||
79 | if id >= next_item_id then | ||
80 | next_item_id = id + 1 | ||
81 | end | ||
82 | end | ||
83 | end | ||
84 | end | ||
85 | if old_generated.include? "panel_groups" then | ||
86 | old_generated["panel_groups"].each do |name, id| | ||
87 | if id >= next_item_id then | ||
88 | next_item_id = id + 1 | ||
89 | end | ||
90 | end | ||
91 | end | ||
76 | if old_generated.include? "progression" then | 92 | if old_generated.include? "progression" then |
77 | old_generated["progression"].each do |name, id| | 93 | old_generated["progression"].each do |name, id| |
78 | if id >= next_item_id then | 94 | if id >= next_item_id then |
@@ -82,6 +98,7 @@ if old_generated.include? "progression" then | |||
82 | end | 98 | end |
83 | 99 | ||
84 | door_groups = Set[] | 100 | door_groups = Set[] |
101 | panel_groups = Set[] | ||
85 | 102 | ||
86 | config = YAML.load_file(configpath) | 103 | config = YAML.load_file(configpath) |
87 | config.each do |room_name, room_data| | 104 | config.each do |room_name, room_data| |
@@ -163,6 +180,29 @@ config.each do |room_name, room_data| | |||
163 | end | 180 | end |
164 | end | 181 | end |
165 | 182 | ||
183 | if room_data.include? "panel_doors" | ||
184 | room_data["panel_doors"].each do |panel_door_name, panel_door| | ||
185 | unless old_generated.include? "panel_doors" and old_generated["panel_doors"].include? room_name and old_generated["panel_doors"][room_name].include? panel_door_name then | ||
186 | old_generated["panel_doors"] ||= {} | ||
187 | old_generated["panel_doors"][room_name] ||= {} | ||
188 | old_generated["panel_doors"][room_name][panel_door_name] = next_item_id | ||
189 | |||
190 | next_item_id += 1 | ||
191 | end | ||
192 | |||
193 | if panel_door.include? "panel_group" and not panel_groups.include? panel_door["panel_group"] then | ||
194 | panel_groups.add(panel_door["panel_group"]) | ||
195 | |||
196 | unless old_generated.include? "panel_groups" and old_generated["panel_groups"].include? panel_door["panel_group"] then | ||
197 | old_generated["panel_groups"] ||= {} | ||
198 | old_generated["panel_groups"][panel_door["panel_group"]] = next_item_id | ||
199 | |||
200 | next_item_id += 1 | ||
201 | end | ||
202 | end | ||
203 | end | ||
204 | end | ||
205 | |||
166 | if room_data.include? "progression" | 206 | if room_data.include? "progression" |
167 | room_data["progression"].each do |progression_name, pdata| | 207 | room_data["progression"].each do |progression_name, pdata| |
168 | unless old_generated.include? "progression" and old_generated["progression"].include? progression_name then | 208 | unless old_generated.include? "progression" and old_generated["progression"].include? progression_name then |