From e41bdceb052334f2c86a78ba41411a9c85df7cc5 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Wed, 22 May 2024 20:09:52 -0400 Subject: 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 --- utils/pickle_static_data.py | 9 ++++++--- utils/validate_config.rb | 9 ++++++++- 2 files changed, 14 insertions(+), 4 deletions(-) (limited to 'utils') diff --git a/utils/pickle_static_data.py b/utils/pickle_static_data.py index 10ec69b..e40c21c 100644 --- a/utils/pickle_static_data.py +++ b/utils/pickle_static_data.py @@ -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): @@ -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 diff --git a/utils/validate_config.rb b/utils/validate_config.rb index 831fee2..498980b 100644 --- a/utils/validate_config.rb +++ b/utils/validate_config.rb @@ -39,11 +39,12 @@ mentioned_doors = Set[] 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"] @@ -257,6 +258,12 @@ config.each do |room_name, room| 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 -- cgit 1.4.1