From bb4e4e308f8f73b1be8b717b5c0478a342c1196d Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Fri, 12 Sep 2025 11:01:30 -0400 Subject: Added gallery painting shuffle --- apworld/__init__.py | 1 + apworld/options.py | 6 ++++++ apworld/player_logic.py | 3 +++ data/maps/the_gallery/doors.txtpb | 34 +++++++++++++++++----------------- proto/data.proto | 3 +++ 5 files changed, 30 insertions(+), 17 deletions(-) diff --git a/apworld/__init__.py b/apworld/__init__.py index 4044d76..54f870f 100644 --- a/apworld/__init__.py +++ b/apworld/__init__.py @@ -82,6 +82,7 @@ class Lingo2World(World): "keyholder_sanity", "shuffle_control_center_colors", "shuffle_doors", + "shuffle_gallery_paintings", "shuffle_letters", "shuffle_symbols", "victory_condition", diff --git a/apworld/options.py b/apworld/options.py index 240f8af..4f0b32a 100644 --- a/apworld/options.py +++ b/apworld/options.py @@ -16,6 +16,11 @@ class ShuffleControlCenterColors(Toggle): display_name = "Shuffle Control Center Colors" +class ShuffleGalleryPaintings(Toggle): + """If enabled, gallery paintings will appear from receiving an item rather than by triggering them normally.""" + display_name = "Shuffle Gallery Paintings" + + class ShuffleLetters(Choice): """ Controls how letter unlocks are handled. Note that H1, I1, N1, and T1 will always be present at their vanilla @@ -125,6 +130,7 @@ class VictoryCondition(Choice): class Lingo2Options(PerGameCommonOptions): shuffle_doors: ShuffleDoors shuffle_control_center_colors: ShuffleControlCenterColors + shuffle_gallery_paintings: ShuffleGalleryPaintings shuffle_letters: ShuffleLetters shuffle_symbols: ShuffleSymbols keyholder_sanity: KeyholderSanity diff --git a/apworld/player_logic.py b/apworld/player_logic.py index d435bbc..2ff7163 100644 --- a/apworld/player_logic.py +++ b/apworld/player_logic.py @@ -190,6 +190,9 @@ class Lingo2PlayerLogic: not self.world.options.shuffle_control_center_colors): continue + if door.type == data_pb2.DoorType.GALLERY_PAINTING and not self.world.options.shuffle_gallery_paintings: + continue + door_item_name = self.world.static_logic.get_door_item_name(door) self.item_by_door[door.id] = (door_item_name, 1) self.real_items.append(door_item_name) diff --git a/data/maps/the_gallery/doors.txtpb b/data/maps/the_gallery/doors.txtpb index a7a5d85..adbc766 100644 --- a/data/maps/the_gallery/doors.txtpb +++ b/data/maps/the_gallery/doors.txtpb @@ -1,7 +1,7 @@ # The Gallery is interesting because there's so many cross-map requirements. doors { name: "Darkroom Painting" - type: ITEM_ONLY + type: GALLERY_PAINTING #move_paintings { room: "Main Area" name: "DARKROOM" } receivers: "Components/Paintings/darkroom/teleportListener" panels { map: "the_darkroom" room: "First Room" name: "BISON" } @@ -27,14 +27,14 @@ doors { } doors { name: "Butterfly Painting" - type: ITEM_ONLY + type: GALLERY_PAINTING #move_paintings { room: "Main Area" name: "BUTTERFLY" } receivers: "Components/Paintings/butterfly/teleportListener" rooms { map: "the_butterfly" name: "Main Area" } } doors { name: "Between Painting" - type: ITEM_ONLY + type: GALLERY_PAINTING #move_paintings { room: "Main Area" name: "BETWEEN" } receivers: "Components/Paintings/between/teleportListener" panels { map: "the_between" room: "Main Area" name: "SUN" } @@ -70,14 +70,14 @@ doors { } doors { name: "Entry Painting" - type: ITEM_ONLY + type: GALLERY_PAINTING #move_paintings { room: "Main Area" name: "ENTRY" } receivers: "Components/Paintings/eyes/teleportListener" panels { map: "the_entry" room: "Eye Room" name: "I" } } doors { name: "Wise Painting" - type: ITEM_ONLY + type: GALLERY_PAINTING #move_paintings { room: "Main Area" name: "WISE" } receivers: "Components/Paintings/triangle/teleportListener" panels { map: "the_wise" room: "Entry" name: "INK" } @@ -105,7 +105,7 @@ doors { } doors { name: "Tree Painting" - type: ITEM_ONLY + type: GALLERY_PAINTING #move_paintings { room: "Main Area" name: "TREE" } receivers: "Components/Paintings/Clue Maps/tree/teleportListener" panels { map: "the_tree" room: "Main Area" name: "COLOR" } @@ -142,35 +142,35 @@ doors { } doors { name: "Unyielding Painting" - type: ITEM_ONLY + type: GALLERY_PAINTING #move_paintings { room: "Main Area" name: "UNYIELDING" } receivers: "Components/Paintings/Clue Maps/unyielding/teleportListener" rooms { map: "the_unyielding" name: "Digital Entrance" } } doors { name: "Graveyard Painting" - type: ITEM_ONLY + type: GALLERY_PAINTING #move_paintings { room: "Main Area" name: "GRAVEYARD" } receivers: "Components/Paintings/Endings/grave/teleportListener" rooms { map: "the_graveyard" name: "Outside" } } doors { name: "Control Center Painting" - type: ITEM_ONLY + type: GALLERY_PAINTING #move_paintings { room: "Main Area" name: "CC" } receivers: "Components/Paintings/Endings/desert/teleportListener" rooms { map: "the_impressive" name: "M2 Room" } } doors { name: "Tower Painting" - type: ITEM_ONLY + type: GALLERY_PAINTING #move_paintings { room: "Main Area" name: "TOWER" } receivers: "Components/Paintings/Endings/red/teleportListener" rooms { map: "the_tower" name: "First Floor" } } doors { name: "Wondrous Painting" - type: ITEM_ONLY + type: GALLERY_PAINTING #move_paintings { room: "Main Area" name: "WONDROUS" } receivers: "Components/Paintings/Endings/window/teleportListener" panels { map: "the_wondrous" room: "Entry" name: "WONDER" } @@ -187,42 +187,42 @@ doors { } doors { name: "Rainbow Painting" - type: ITEM_ONLY + type: GALLERY_PAINTING #move_paintings { room: "Main Area" name: "RAINBOW" } receivers: "Components/Paintings/Endings/rainbow/teleportListener" rooms { map: "daedalus" name: "Rainbow Start" } } doors { name: "Words Painting" - type: ITEM_ONLY + type: GALLERY_PAINTING #move_paintings { room: "Main Area" name: "WORDS" } receivers: "Components/Paintings/Endings/words/teleportListener" rooms { map: "the_words" name: "Main Area" } } doors { name: "Colorful Painting" - type: ITEM_ONLY + type: GALLERY_PAINTING #move_paintings { room: "Main Area" name: "COLORFUL" } receivers: "Components/Paintings/Endings/colorful/teleportListener" rooms { map: "the_colorful" name: "White Room" } } doors { name: "Castle Painting" - type: ITEM_ONLY + type: GALLERY_PAINTING #move_paintings { room: "Main Area" name: "CASTLE" } receivers: "Components/Paintings/Endings/castle/teleportListener" rooms { map: "daedalus" name: "Castle" } } doors { name: "Sun Temple Painting" - type: ITEM_ONLY + type: GALLERY_PAINTING #move_paintings { room: "Main Area" name: "SUNTEMPLE" } receivers: "Components/Paintings/Endings/temple/teleportListener" rooms { map: "the_sun_temple" name: "Entrance" } } doors { name: "Ancient Painting" - type: ITEM_ONLY + type: GALLERY_PAINTING #move_paintings { room: "Main Area" name: "ANCIENT" } receivers: "Components/Paintings/Endings/cubes/teleportListener" rooms { map: "the_ancient" name: "Outside" } diff --git a/proto/data.proto b/proto/data.proto index 827e639..bf216b9 100644 --- a/proto/data.proto +++ b/proto/data.proto @@ -27,6 +27,9 @@ enum DoorType { // This door is an item if gravestone shuffle is enabled, and is a location as long as panelsanity is not on. GRAVESTONE = 6; + + // This door is never a location, and is an item as long as gallery painting shuffle is on. + GALLERY_PAINTING = 7; } enum DoorGroupType { -- cgit 1.4.1