diff options
| author | Star Rauchenberger <fefferburbia@gmail.com> | 2024-03-21 10:46:53 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-21 16:46:53 +0100 |
| commit | cb83f8d340ee13746ce2c63c7cd1b247244eb65a (patch) | |
| tree | f8a25fead6c0089dc78c7335b18518651cc7fad8 /utils | |
| parent | e016228d2b76fa367889c9d98d6eb9e783f98cb4 (diff) | |
| download | lingo-apworld-cb83f8d340ee13746ce2c63c7cd1b247244eb65a.tar.gz lingo-apworld-cb83f8d340ee13746ce2c63c7cd1b247244eb65a.tar.bz2 lingo-apworld-cb83f8d340ee13746ce2c63c7cd1b247244eb65a.zip | |
Lingo: Add item/location groups (#2789)
Diffstat (limited to 'utils')
| -rw-r--r-- | utils/pickle_static_data.py | 13 | ||||
| -rw-r--r-- | utils/validate_config.rb | 2 |
2 files changed, 10 insertions, 5 deletions
| diff --git a/utils/pickle_static_data.py b/utils/pickle_static_data.py index c7a2711..5d6fa1e 100644 --- a/utils/pickle_static_data.py +++ b/utils/pickle_static_data.py | |||
| @@ -255,10 +255,15 @@ def process_door(room_name, door_name, door_data): | |||
| 255 | else: | 255 | else: |
| 256 | junk_item = False | 256 | junk_item = False |
| 257 | 257 | ||
| 258 | if "group" in door_data: | 258 | if "door_group" in door_data: |
| 259 | group = door_data["group"] | 259 | door_group = door_data["door_group"] |
| 260 | else: | 260 | else: |
| 261 | group = None | 261 | door_group = None |
| 262 | |||
| 263 | if "item_group" in door_data: | ||
| 264 | item_group = door_data["item_group"] | ||
| 265 | else: | ||
| 266 | item_group = None | ||
| 262 | 267 | ||
| 263 | # panels is a list of panels. Each panel can either be a simple string (the name of a panel in the current room) or | 268 | # panels is a list of panels. Each panel can either be a simple string (the name of a panel in the current room) or |
| 264 | # a dictionary specifying a panel in a different room. | 269 | # a dictionary specifying a panel in a different room. |
| @@ -308,7 +313,7 @@ def process_door(room_name, door_name, door_data): | |||
| 308 | painting_ids = [] | 313 | painting_ids = [] |
| 309 | 314 | ||
| 310 | door_obj = Door(door_name, item_name, location_name, panels, skip_location, skip_item, has_doors, | 315 | door_obj = Door(door_name, item_name, location_name, panels, skip_location, skip_item, has_doors, |
| 311 | painting_ids, event, group, include_reduce, junk_item) | 316 | painting_ids, event, door_group, include_reduce, junk_item, item_group) |
| 312 | 317 | ||
| 313 | DOORS_BY_ROOM[room_name][door_name] = door_obj | 318 | DOORS_BY_ROOM[room_name][door_name] = door_obj |
| 314 | 319 | ||
| diff --git a/utils/validate_config.rb b/utils/validate_config.rb index 96ed9fc..ae0ac61 100644 --- a/utils/validate_config.rb +++ b/utils/validate_config.rb | |||
| @@ -42,7 +42,7 @@ door_groups = {} | |||
| 42 | 42 | ||
| 43 | directives = Set["entrances", "panels", "doors", "paintings", "progression"] | 43 | directives = Set["entrances", "panels", "doors", "paintings", "progression"] |
| 44 | panel_directives = Set["id", "required_room", "required_door", "required_panel", "colors", "check", "exclude_reduce", "tag", "link", "subtag", "achievement", "copy_to_sign", "non_counting", "hunt"] | 44 | panel_directives = Set["id", "required_room", "required_door", "required_panel", "colors", "check", "exclude_reduce", "tag", "link", "subtag", "achievement", "copy_to_sign", "non_counting", "hunt"] |
| 45 | door_directives = Set["id", "painting_id", "panels", "item_name", "location_name", "skip_location", "skip_item", "group", "include_reduce", "junk_item", "event"] | 45 | door_directives = Set["id", "painting_id", "panels", "item_name", "item_group", "location_name", "skip_location", "skip_item", "door_group", "include_reduce", "junk_item", "event"] |
| 46 | painting_directives = Set["id", "enter_only", "exit_only", "orientation", "required_door", "required", "required_when_no_doors", "move", "req_blocked", "req_blocked_when_no_doors"] | 46 | painting_directives = Set["id", "enter_only", "exit_only", "orientation", "required_door", "required", "required_when_no_doors", "move", "req_blocked", "req_blocked_when_no_doors"] |
| 47 | 47 | ||
| 48 | non_counting = 0 | 48 | non_counting = 0 |
