Skip to content

Commit

Permalink
Add some more item groups
Browse files Browse the repository at this point in the history
  • Loading branch information
hatkirby committed Jan 28, 2024
1 parent 70a0f93 commit 4c73947
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 2 deletions.
42 changes: 42 additions & 0 deletions worlds/lingo/data/LL1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
# - item_name: Overrides the name of the item generated for this door.
# If not specified, the item name will be generated from
# the room name and the door name.
# - item_group: If set, this item will be in the specified item group.
# - location_name: Overrides the name of the location generated for this
# door. If not specified, the location name will be
# generated using the names of the panels.
Expand Down Expand Up @@ -243,6 +244,7 @@
Seeker Entrance:
id: Entry Room Area Doors/Door_entrance_entrance
item_name: The Seeker - Entrance
item_group: Room Entrances
panels:
- OPEN
Rhyme Room Entrance:
Expand Down Expand Up @@ -475,6 +477,7 @@
Tenacious Entrance:
id: Palindrome Room Area Doors/Door_slaughter_laughter
group: Entrances to The Tenacious
item_group: Room Entrances
panels:
- SLAUGHTER
Symmetry Door:
Expand All @@ -501,6 +504,7 @@
id: Appendix Room Area Doors/Door_open_open
item_name: The Traveled - Entrance
group: Entrance to The Traveled
item_group: Room Entrances
panels:
- OPEN
Lost Door:
Expand Down Expand Up @@ -562,6 +566,7 @@
doors:
Sun Painting:
item_name: Pilgrim Room - Sun Painting
item_group: Paintings
location_name: Pilgrim Room - HOT CRUST
painting_id: pilgrim_painting2
panels:
Expand Down Expand Up @@ -732,11 +737,13 @@
Tenacious Entrance:
id: Palindrome Room Area Doors/Door_decay_day
group: Entrances to The Tenacious
item_group: Room Entrances
panels:
- DECAY
Discerning Entrance:
id: Shuffle Room Area Doors/Door_nope_open
item_name: The Discerning - Entrance
item_group: Room Entrances
panels:
- NOPE
Tower Entrance:
Expand Down Expand Up @@ -1144,6 +1151,7 @@
Tenacious Entrance:
id: Palindrome Room Area Doors/Door_massacred_sacred
group: Entrances to The Tenacious
item_group: Room Entrances
panels:
- MASSACRED
Black Door:
Expand All @@ -1154,10 +1162,12 @@
Agreeable Entrance:
id: Symmetry Room Area Doors/Door_close_open
item_name: The Agreeable - Entrance
item_group: Room Entrances
panels:
- CLOSE
Painting Shortcut:
item_name: Starting Room - Street Painting
item_group: Paintings
painting_id: eyes_yellow_painting2
panels:
- RIGHT
Expand Down Expand Up @@ -1217,6 +1227,7 @@
Tenacious Entrance:
id: Palindrome Room Area Doors/Door_dread_dead
group: Entrances to The Tenacious
item_group: Room Entrances
panels:
- DREAD
The Agreeable:
Expand Down Expand Up @@ -1285,6 +1296,7 @@
doors:
Shortcut to Hedge Maze:
id: Symmetry Room Area Doors/Door_bye_hi
item_group: Room Entrances
group: Hedge Maze Doors
panels:
- BYE
Expand Down Expand Up @@ -1379,11 +1391,13 @@
id: Maze Area Doors/Door_maze_maze
item_name: The Perceptive - Entrance
group: Hedge Maze Doors
item_group: Room Entrances
panels:
- DOWN
Painting Shortcut:
painting_id: garden_painting_tower2
item_name: Starting Room - Hedge Maze Painting
item_group: Paintings
skip_location: True
panels:
- DOWN
Expand All @@ -1395,6 +1409,7 @@
skip_location: True
item_name: The Observant - Entrance
group: Observant Doors
item_group: Room Entrances
panels:
- room: The Perceptive
panel: GAZE
Expand Down Expand Up @@ -2367,6 +2382,7 @@
Painting Shortcut:
painting_id: flower_painting_8
item_name: Starting Room - Flower Painting
item_group: Paintings
skip_location: True
panels:
- room: First Second Third Fourth
Expand Down Expand Up @@ -2905,6 +2921,7 @@
Initiated Entrance:
id: Red Blue Purple Room Area Doors/Door_locked_knocked
item_name: The Initiated - Entrance
item_group: Room Entrances
panels:
- OXEN
# These would be more appropriate in Champion's Rest, but as currently
Expand Down Expand Up @@ -2957,6 +2974,7 @@
panel: BACKSIDE
Eight Door:
id: Red Blue Purple Room Area Doors/Door_a_strands2
item_group: Room Entrances
skip_location: True
panels:
- room: The Incomparable
Expand Down Expand Up @@ -3153,6 +3171,7 @@
Color Hallways Entrance:
id: Appendix Room Area Doors/Door_hello_hi
group: Entrance to The Traveled
item_group: Room Entrances
panels:
- HELLO
Color Hallways:
Expand Down Expand Up @@ -3268,17 +3287,20 @@
Bold Entrance:
id: Red Blue Purple Room Area Doors/Door_unopened_open
item_name: The Bold - Entrance
item_group: Room Entrances
panels:
- UNOPEN
Painting Shortcut:
painting_id: pencil_painting6
skip_location: True
item_name: Starting Room - Pencil Painting
item_group: Paintings
panels:
- UNOPEN
Steady Entrance:
id: Rock Room Doors/Door_2
item_name: The Steady - Entrance
item_group: Room Entrances
panels:
- BEGIN
Lilac Entrance:
Expand Down Expand Up @@ -3499,6 +3521,7 @@
Undeterred Entrance:
id: Red Blue Purple Room Area Doors/Door_pen_open
item_name: The Undeterred - Entrance
item_group: Room Entrances
panels:
- PEN
Painting Shortcut:
Expand All @@ -3507,18 +3530,21 @@
- arrows_painting3
skip_location: True
item_name: Starting Room - Blue Painting
item_group: Paintings
panels:
- PEN
Green Painting:
painting_id: maze_painting_3
skip_location: True
item_group: Paintings
panels:
- FOUR
Twos:
id:
- Count Up Room Area Doors/Door_two_hider
- Count Up Room Area Doors/Door_two_hider_2
include_reduce: True
item_group: Numbers
panels:
- ONE
Threes:
Expand All @@ -3528,6 +3554,7 @@
- Count Up Room Area Doors/Door_three_hider_3
location_name: Twos
include_reduce: True
item_group: Numbers
panels:
- TWO (1)
- TWO (2)
Expand All @@ -3546,6 +3573,7 @@
- Count Up Room Area Doors/Door_four_hider_3
- Count Up Room Area Doors/Door_four_hider_4
skip_location: True
item_group: Numbers
panels:
- THREE (1)
- THREE (2)
Expand All @@ -3557,6 +3585,7 @@
- Count Up Room Area Doors/Door_five_hider_5
location_name: Fours
item_name: Number Hunt - Fives
item_group: Numbers
include_reduce: True
panels:
- FOUR
Expand All @@ -3569,6 +3598,7 @@
Challenge Entrance:
id: Count Up Room Area Doors/Door_zero_unlocked
item_name: Number Hunt - Challenge Entrance
item_group: Room Entrances
panels:
- ZERO
paintings:
Expand Down Expand Up @@ -3729,6 +3759,7 @@
- Count Up Room Area Doors/Door_six_hider_6
painting_id: pencil_painting3 # See note in Outside The Bold
location_name: Fives
item_group: Numbers
include_reduce: True
panels:
- FIVE
Expand All @@ -3751,6 +3782,7 @@
- Count Up Room Area Doors/Door_seven_hider_6
- Count Up Room Area Doors/Door_seven_hider_7
location_name: Sixes
item_group: Numbers
include_reduce: True
panels:
- SIX
Expand All @@ -3776,6 +3808,7 @@
- Count Up Room Area Doors/Door_eight_hider_7
- Count Up Room Area Doors/Door_eight_hider_8
location_name: Sevens
item_group: Numbers
include_reduce: True
panels:
- SEVEN
Expand Down Expand Up @@ -3803,6 +3836,7 @@
- Count Up Room Area Doors/Door_nine_hider_8
- Count Up Room Area Doors/Door_nine_hider_9
location_name: Eights
item_group: Numbers
include_reduce: True
panels:
- EIGHT
Expand All @@ -3825,6 +3859,7 @@
id: Count Up Room Area Doors/Door_zero_hider_2
location_name: Nines
item_name: Outside The Undeterred - Zero Door
item_group: Numbers
include_reduce: True
panels:
- NINE
Expand Down Expand Up @@ -5734,6 +5769,7 @@
Wondrous Entrance:
id: Red Blue Purple Room Area Doors/Door_wonderland
item_name: The Wondrous - Entrance
item_group: Room Entrances
panels:
- SHRINK
The Wondrous (Doorknob):
Expand All @@ -5754,6 +5790,7 @@
- arrows_painting2
skip_location: True
item_name: Starting Room - Symmetry Painting
item_group: Paintings
panels:
- room: Outside The Wondrous
panel: SHRINK
Expand Down Expand Up @@ -5858,6 +5895,7 @@
doors:
Exit:
id: Red Blue Purple Room Area Doors/Door_wonderland_exit
item_group: Paintings
painting_id: arrows_painting_9
include_reduce: True
panels:
Expand Down Expand Up @@ -6054,6 +6092,7 @@
Wanderer Entrance:
id: Tower Room Area Doors/Door_wanderer_entrance
item_name: The Wanderer - Entrance
item_group: Room Entrances
panels:
- WANDERLUST
Tower Entrance:
Expand Down Expand Up @@ -6986,6 +7025,7 @@
Wise Entrance:
id: Clock Room Area Doors/Door_time_start
item_name: The Wise - Entrance
item_group: Room Entrances
panels:
- KITTEN
- CAT
Expand Down Expand Up @@ -7239,6 +7279,7 @@
Scientific Entrance:
id: Red Blue Purple Room Area Doors/Door_chemistry_lab
item_name: The Scientific - Entrance
item_group: Room Entrances
panels:
- OPEN
The Scientific:
Expand Down Expand Up @@ -7674,5 +7715,6 @@
doors:
Welcome Door:
id: Entry Room Area Doors/Door_challenge_challenge
item_group: Room Entrances
panels:
- WELCOME
3 changes: 3 additions & 0 deletions worlds/lingo/items.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ def load_item_data():
door.door_ids, door.painting_ids)
ITEMS_BY_GROUP.setdefault("Doors", []).append(door.item_name)

if door.item_group is not None:
ITEMS_BY_GROUP.setdefault(door.item_group, []).append(door.item_name)

for group, group_door_ids in door_groups.items():
ALL_ITEM_TABLE[group] = ItemData(get_door_group_item_id(group),
ItemClassification.progression, "door group", group_door_ids, [])
Expand Down
8 changes: 7 additions & 1 deletion worlds/lingo/static_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class Door(NamedTuple):
group: Optional[str]
include_reduce: bool
junk_item: bool
item_group: Optional[str]


class Panel(NamedTuple):
Expand Down Expand Up @@ -370,6 +371,11 @@ def process_door(room_name, door_name, door_data):
else:
group = None

if "item_group" in door_data:
item_group = door_data["item_group"]
else:
item_group = None

# panels is a list of panels. Each panel can either be a simple string (the name of a panel in the current room) or
# a dictionary specifying a panel in a different room.
if "panels" in door_data:
Expand Down Expand Up @@ -424,7 +430,7 @@ def process_door(room_name, door_name, door_data):
painting_ids = []

door_obj = Door(door_name, item_name, location_name, panels, skip_location, skip_item, door_ids,
painting_ids, event, group, include_reduce, junk_item)
painting_ids, event, group, include_reduce, junk_item, item_group)

DOORS[door_obj.item_name] = door_obj
DOORS_BY_ROOM[room_name][door_name] = door_obj
Expand Down
2 changes: 1 addition & 1 deletion worlds/lingo/utils/validate_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

directives = Set["entrances", "panels", "doors", "paintings", "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"]
door_directives = Set["id", "painting_id", "panels", "item_name", "location_name", "skip_location", "skip_item", "group", "include_reduce", "junk_item", "event"]
door_directives = Set["id", "painting_id", "panels", "item_name", "item_group", "location_name", "skip_location", "skip_item", "group", "include_reduce", "junk_item", "event"]
painting_directives = Set["id", "enter_only", "exit_only", "orientation", "required_door", "required", "required_when_no_doors", "move", "req_blocked", "req_blocked_when_no_doors"]

non_counting = 0
Expand Down

0 comments on commit 4c73947

Please sign in to comment.