diff options
Diffstat (limited to 'utils')
| -rw-r--r-- | utils/pickle_static_data.py | 9 | ||||
| -rw-r--r-- | utils/validate_config.rb | 9 |
2 files changed, 14 insertions, 4 deletions
| 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): | |||
| 150 | def process_panel(room_name, panel_name, panel_data): | 150 | def process_panel(room_name, panel_name, panel_data): |
| 151 | global PANELS_BY_ROOM | 151 | global PANELS_BY_ROOM |
| 152 | 152 | ||
| 153 | full_name = f"{room_name} - {panel_name}" | ||
| 154 | |||
| 155 | # required_room can either be a single room or a list of rooms. | 153 | # required_room can either be a single room or a list of rooms. |
| 156 | if "required_room" in panel_data: | 154 | if "required_room" in panel_data: |
| 157 | if isinstance(panel_data["required_room"], list): | 155 | if isinstance(panel_data["required_room"], list): |
| @@ -229,8 +227,13 @@ def process_panel(room_name, panel_name, panel_data): | |||
| 229 | else: | 227 | else: |
| 230 | non_counting = False | 228 | non_counting = False |
| 231 | 229 | ||
| 230 | if "location_name" in panel_data: | ||
| 231 | location_name = panel_data["location_name"] | ||
| 232 | else: | ||
| 233 | location_name = None | ||
| 234 | |||
| 232 | panel_obj = Panel(required_rooms, required_doors, required_panels, colors, check, event, exclude_reduce, | 235 | panel_obj = Panel(required_rooms, required_doors, required_panels, colors, check, event, exclude_reduce, |
| 233 | achievement, non_counting) | 236 | achievement, non_counting, location_name) |
| 234 | PANELS_BY_ROOM[room_name][panel_name] = panel_obj | 237 | PANELS_BY_ROOM[room_name][panel_name] = panel_obj |
| 235 | 238 | ||
| 236 | 239 | ||
| 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[] | |||
| 39 | mentioned_panels = Set[] | 39 | mentioned_panels = Set[] |
| 40 | mentioned_sunwarp_entrances = Set[] | 40 | mentioned_sunwarp_entrances = Set[] |
| 41 | mentioned_sunwarp_exits = Set[] | 41 | mentioned_sunwarp_exits = Set[] |
| 42 | mentioned_paintings = Set[] | ||
| 42 | 43 | ||
| 43 | door_groups = {} | 44 | door_groups = {} |
| 44 | 45 | ||
| 45 | directives = Set["entrances", "panels", "doors", "paintings", "sunwarps", "progression"] | 46 | directives = Set["entrances", "panels", "doors", "paintings", "sunwarps", "progression"] |
| 46 | panel_directives = Set["id", "required_room", "required_door", "required_panel", "colors", "check", "exclude_reduce", "tag", "link", "subtag", "achievement", "copy_to_sign", "non_counting", "hunt"] | 47 | 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"] |
| 47 | door_directives = Set["id", "painting_id", "panels", "item_name", "item_group", "location_name", "skip_location", "skip_item", "door_group", "include_reduce", "event", "warp_id"] | 48 | door_directives = Set["id", "painting_id", "panels", "item_name", "item_group", "location_name", "skip_location", "skip_item", "door_group", "include_reduce", "event", "warp_id"] |
| 48 | painting_directives = Set["id", "enter_only", "exit_only", "orientation", "required_door", "required", "required_when_no_doors", "move", "req_blocked", "req_blocked_when_no_doors"] | 49 | painting_directives = Set["id", "enter_only", "exit_only", "orientation", "required_door", "required", "required_when_no_doors", "move", "req_blocked", "req_blocked_when_no_doors"] |
| 49 | 50 | ||
| @@ -257,6 +258,12 @@ config.each do |room_name, room| | |||
| 257 | unless paintings.include? painting["id"] then | 258 | unless paintings.include? painting["id"] then |
| 258 | puts "#{room_name} :::: Invalid Painting ID #{painting["id"]}" | 259 | puts "#{room_name} :::: Invalid Painting ID #{painting["id"]}" |
| 259 | end | 260 | end |
| 261 | |||
| 262 | if mentioned_paintings.include?(painting["id"]) then | ||
| 263 | puts "Painting #{painting["id"]} is mentioned more than once" | ||
| 264 | else | ||
| 265 | mentioned_paintings.add(painting["id"]) | ||
| 266 | end | ||
| 260 | else | 267 | else |
| 261 | puts "#{room_name} :::: Painting is missing an ID" | 268 | puts "#{room_name} :::: Painting is missing an ID" |
| 262 | end | 269 | end |
