Skip to content

Commit

Permalink
Lingo: Minor logic fixes (part 2) (ArchipelagoMW#3250)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
hatkirby authored and sflavelle committed Jun 20, 2024
1 parent 40b46cb commit fc0081c
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 10 deletions.
13 changes: 9 additions & 4 deletions worlds/lingo/data/LL1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2052,6 +2052,7 @@
door: Rhyme Room Entrance
Art Gallery:
warp: True
Roof: True # by parkouring through the Bearer shortcut
panels:
RED:
id: Color Arrow Room/Panel_red_afar
Expand Down Expand Up @@ -2333,6 +2334,7 @@
# This is the MASTERY on the other side of THE FEARLESS. It can only be
# accessed by jumping from the top of the tower.
id: Master Room/Panel_mastery_mastery8
location_name: The Fearless - MASTERY
tag: midwhite
hunt: True
required_door:
Expand Down Expand Up @@ -4098,6 +4100,7 @@
Number Hunt:
room: Number Hunt
door: Door to Directional Gallery
Roof: True # through ceiling of sunwarp
panels:
PEPPER:
id: Backside Room/Panel_pepper_salt
Expand Down Expand Up @@ -5390,6 +5393,7 @@
- The Artistic (Apple)
- The Artistic (Lattice)
check: True
location_name: The Artistic - Achievement
achievement: The Artistic
FINE:
id: Ceiling Room/Panel_yellow_top_5
Expand Down Expand Up @@ -6046,7 +6050,7 @@
paintings:
- id: symmetry_painting_a_5
orientation: east
- id: symmetry_painting_a_5
- id: symmetry_painting_b_5
disable: True
The Wondrous (Window):
entrances:
Expand Down Expand Up @@ -6814,9 +6818,6 @@
tag: syn rhyme
subtag: bot
link: rhyme FALL
LEAP:
id: Double Room/Panel_leap_leap
tag: midwhite
doors:
Exit:
id: Double Room Area Doors/Door_room_exit
Expand Down Expand Up @@ -7065,6 +7066,9 @@
tag: syn rhyme
subtag: bot
link: rhyme CREATIVE
LEAP:
id: Double Room/Panel_leap_leap
tag: midwhite
doors:
Door to Cross:
id: Double Room Area Doors/Door_room_4a
Expand Down Expand Up @@ -7272,6 +7276,7 @@
MASTERY:
id: Master Room/Panel_mastery_mastery
tag: midwhite
hunt: True
required_door:
room: Orange Tower Seventh Floor
door: Mastery
Expand Down
Binary file modified worlds/lingo/data/generated.dat
Binary file not shown.
2 changes: 1 addition & 1 deletion worlds/lingo/data/ids.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,6 @@ panels:
BOUNCE: 445010
SCRAWL: 445011
PLUNGE: 445012
LEAP: 445013
Rhyme Room (Circle):
BIRD: 445014
LETTER: 445015
Expand All @@ -790,6 +789,7 @@ panels:
GEM: 445031
INNOVATIVE (Top): 445032
INNOVATIVE (Bottom): 445033
LEAP: 445013
Room Room:
DOOR (1): 445034
DOOR (2): 445035
Expand Down
1 change: 1 addition & 0 deletions worlds/lingo/datatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ class Panel(NamedTuple):
exclude_reduce: bool
achievement: bool
non_counting: bool
location_name: Optional[str]


class Painting(NamedTuple):
Expand Down
2 changes: 1 addition & 1 deletion worlds/lingo/locations.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def load_location_data():

for room_name, panels in PANELS_BY_ROOM.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
if panel.check:
Expand Down
9 changes: 6 additions & 3 deletions worlds/lingo/utils/pickle_static_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,6 @@ def process_entrance(source_room, doors, room_obj):
def process_panel(room_name, panel_name, panel_data):
global PANELS_BY_ROOM

full_name = f"{room_name} - {panel_name}"

# required_room can either be a single room or a list of rooms.
if "required_room" in panel_data:
if isinstance(panel_data["required_room"], list):
Expand Down Expand Up @@ -229,8 +227,13 @@ def process_panel(room_name, panel_name, panel_data):
else:
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,
achievement, non_counting)
achievement, non_counting, location_name)
PANELS_BY_ROOM[room_name][panel_name] = panel_obj


Expand Down
9 changes: 8 additions & 1 deletion worlds/lingo/utils/validate_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,12 @@
mentioned_panels = Set[]
mentioned_sunwarp_entrances = Set[]
mentioned_sunwarp_exits = Set[]
mentioned_paintings = Set[]

door_groups = {}

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"]
painting_directives = Set["id", "enter_only", "exit_only", "orientation", "required_door", "required", "required_when_no_doors", "move", "req_blocked", "req_blocked_when_no_doors"]

Expand Down Expand Up @@ -257,6 +258,12 @@
unless paintings.include? painting["id"] then
puts "#{room_name} :::: Invalid Painting ID #{painting["id"]}"
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
puts "#{room_name} :::: Painting is missing an ID"
end
Expand Down

0 comments on commit fc0081c

Please sign in to comment.