Lingo: Minor logic fixes (part 2) (#3250)

* Lingo: Minor logic fixes (part 2)

* Update the datafile

* Renamed Fearless Mastery

* Move Rhyme Room LEAP into upper room

* Rename Artistic achievement location

* Fix broken wondrous painting

* Added a test for the Wondrous painting thing
This commit is contained in:
Star Rauchenberger 2024-05-22 20:09:52 -04:00 committed by GitHub
parent 02d3fdf2a6
commit 893a157b23
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 26 additions and 10 deletions

View File

@ -2052,6 +2052,7 @@
door: Rhyme Room Entrance door: Rhyme Room Entrance
Art Gallery: Art Gallery:
warp: True warp: True
Roof: True # by parkouring through the Bearer shortcut
panels: panels:
RED: RED:
id: Color Arrow Room/Panel_red_afar id: Color Arrow Room/Panel_red_afar
@ -2333,6 +2334,7 @@
# This is the MASTERY on the other side of THE FEARLESS. It can only be # This is the MASTERY on the other side of THE FEARLESS. It can only be
# accessed by jumping from the top of the tower. # accessed by jumping from the top of the tower.
id: Master Room/Panel_mastery_mastery8 id: Master Room/Panel_mastery_mastery8
location_name: The Fearless - MASTERY
tag: midwhite tag: midwhite
hunt: True hunt: True
required_door: required_door:
@ -4098,6 +4100,7 @@
Number Hunt: Number Hunt:
room: Number Hunt room: Number Hunt
door: Door to Directional Gallery door: Door to Directional Gallery
Roof: True # through ceiling of sunwarp
panels: panels:
PEPPER: PEPPER:
id: Backside Room/Panel_pepper_salt id: Backside Room/Panel_pepper_salt
@ -5390,6 +5393,7 @@
- The Artistic (Apple) - The Artistic (Apple)
- The Artistic (Lattice) - The Artistic (Lattice)
check: True check: True
location_name: The Artistic - Achievement
achievement: The Artistic achievement: The Artistic
FINE: FINE:
id: Ceiling Room/Panel_yellow_top_5 id: Ceiling Room/Panel_yellow_top_5
@ -6046,7 +6050,7 @@
paintings: paintings:
- id: symmetry_painting_a_5 - id: symmetry_painting_a_5
orientation: east orientation: east
- id: symmetry_painting_a_5 - id: symmetry_painting_b_5
disable: True disable: True
The Wondrous (Window): The Wondrous (Window):
entrances: entrances:
@ -6814,9 +6818,6 @@
tag: syn rhyme tag: syn rhyme
subtag: bot subtag: bot
link: rhyme FALL link: rhyme FALL
LEAP:
id: Double Room/Panel_leap_leap
tag: midwhite
doors: doors:
Exit: Exit:
id: Double Room Area Doors/Door_room_exit id: Double Room Area Doors/Door_room_exit
@ -7065,6 +7066,9 @@
tag: syn rhyme tag: syn rhyme
subtag: bot subtag: bot
link: rhyme CREATIVE link: rhyme CREATIVE
LEAP:
id: Double Room/Panel_leap_leap
tag: midwhite
doors: doors:
Door to Cross: Door to Cross:
id: Double Room Area Doors/Door_room_4a id: Double Room Area Doors/Door_room_4a
@ -7272,6 +7276,7 @@
MASTERY: MASTERY:
id: Master Room/Panel_mastery_mastery id: Master Room/Panel_mastery_mastery
tag: midwhite tag: midwhite
hunt: True
required_door: required_door:
room: Orange Tower Seventh Floor room: Orange Tower Seventh Floor
door: Mastery door: Mastery

Binary file not shown.

View File

@ -766,7 +766,6 @@ panels:
BOUNCE: 445010 BOUNCE: 445010
SCRAWL: 445011 SCRAWL: 445011
PLUNGE: 445012 PLUNGE: 445012
LEAP: 445013
Rhyme Room (Circle): Rhyme Room (Circle):
BIRD: 445014 BIRD: 445014
LETTER: 445015 LETTER: 445015
@ -790,6 +789,7 @@ panels:
GEM: 445031 GEM: 445031
INNOVATIVE (Top): 445032 INNOVATIVE (Top): 445032
INNOVATIVE (Bottom): 445033 INNOVATIVE (Bottom): 445033
LEAP: 445013
Room Room: Room Room:
DOOR (1): 445034 DOOR (1): 445034
DOOR (2): 445035 DOOR (2): 445035

View File

@ -63,6 +63,7 @@ class Panel(NamedTuple):
exclude_reduce: bool exclude_reduce: bool
achievement: bool achievement: bool
non_counting: bool non_counting: bool
location_name: Optional[str]
class Painting(NamedTuple): class Painting(NamedTuple):

View File

@ -39,7 +39,7 @@ def load_location_data():
for room_name, panels in PANELS_BY_ROOM.items(): for room_name, panels in PANELS_BY_ROOM.items():
for panel_name, panel in panels.items(): for panel_name, panel in panels.items():
location_name = f"{room_name} - {panel_name}" location_name = f"{room_name} - {panel_name}" if panel.location_name is None else panel.location_name
classification = LocationClassification.insanity classification = LocationClassification.insanity
if panel.check: if panel.check:

View File

@ -150,8 +150,6 @@ def process_entrance(source_room, doors, room_obj):
def process_panel(room_name, panel_name, panel_data): def process_panel(room_name, panel_name, panel_data):
global PANELS_BY_ROOM global PANELS_BY_ROOM
full_name = f"{room_name} - {panel_name}"
# required_room can either be a single room or a list of rooms. # required_room can either be a single room or a list of rooms.
if "required_room" in panel_data: if "required_room" in panel_data:
if isinstance(panel_data["required_room"], list): if isinstance(panel_data["required_room"], list):
@ -229,8 +227,13 @@ def process_panel(room_name, panel_name, panel_data):
else: else:
non_counting = False non_counting = False
if "location_name" in panel_data:
location_name = panel_data["location_name"]
else:
location_name = None
panel_obj = Panel(required_rooms, required_doors, required_panels, colors, check, event, exclude_reduce, panel_obj = Panel(required_rooms, required_doors, required_panels, colors, check, event, exclude_reduce,
achievement, non_counting) achievement, non_counting, location_name)
PANELS_BY_ROOM[room_name][panel_name] = panel_obj PANELS_BY_ROOM[room_name][panel_name] = panel_obj

View File

@ -39,11 +39,12 @@ mentioned_doors = Set[]
mentioned_panels = Set[] mentioned_panels = Set[]
mentioned_sunwarp_entrances = Set[] mentioned_sunwarp_entrances = Set[]
mentioned_sunwarp_exits = Set[] mentioned_sunwarp_exits = Set[]
mentioned_paintings = Set[]
door_groups = {} door_groups = {}
directives = Set["entrances", "panels", "doors", "paintings", "sunwarps", "progression"] directives = Set["entrances", "panels", "doors", "paintings", "sunwarps", "progression"]
panel_directives = Set["id", "required_room", "required_door", "required_panel", "colors", "check", "exclude_reduce", "tag", "link", "subtag", "achievement", "copy_to_sign", "non_counting", "hunt"] panel_directives = Set["id", "required_room", "required_door", "required_panel", "colors", "check", "exclude_reduce", "tag", "link", "subtag", "achievement", "copy_to_sign", "non_counting", "hunt", "location_name"]
door_directives = Set["id", "painting_id", "panels", "item_name", "item_group", "location_name", "skip_location", "skip_item", "door_group", "include_reduce", "event", "warp_id"] door_directives = Set["id", "painting_id", "panels", "item_name", "item_group", "location_name", "skip_location", "skip_item", "door_group", "include_reduce", "event", "warp_id"]
painting_directives = Set["id", "enter_only", "exit_only", "orientation", "required_door", "required", "required_when_no_doors", "move", "req_blocked", "req_blocked_when_no_doors"] painting_directives = Set["id", "enter_only", "exit_only", "orientation", "required_door", "required", "required_when_no_doors", "move", "req_blocked", "req_blocked_when_no_doors"]
@ -257,6 +258,12 @@ config.each do |room_name, room|
unless paintings.include? painting["id"] then unless paintings.include? painting["id"] then
puts "#{room_name} :::: Invalid Painting ID #{painting["id"]}" puts "#{room_name} :::: Invalid Painting ID #{painting["id"]}"
end end
if mentioned_paintings.include?(painting["id"]) then
puts "Painting #{painting["id"]} is mentioned more than once"
else
mentioned_paintings.add(painting["id"])
end
else else
puts "#{room_name} :::: Painting is missing an ID" puts "#{room_name} :::: Painting is missing an ID"
end end