From 57a08a321bb1054107afd7b91bc6c77cba5abf32 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Mon, 8 Sep 2025 14:11:23 -0400 Subject: Added lavender cubes logic --- apworld/player_logic.py | 3 +++ data/door_groups.txtpb | 20 ++++++++++++++++++++ data/ids.yaml | 3 +-- data/maps/daedalus/doors.txtpb | 8 ++++++-- data/maps/the_ancient/doors.txtpb | 3 ++- data/maps/the_ancient/rooms/Inside.txtpb | 1 - data/maps/the_congruent/doors.txtpb | 8 ++++++-- data/maps/the_great/doors.txtpb | 8 ++++++-- data/maps/the_parthenon/doors.txtpb | 7 ++++++- proto/data.proto | 4 +++- proto/human.proto | 1 - tools/datapacker/main.cpp | 3 --- 12 files changed, 53 insertions(+), 16 deletions(-) diff --git a/apworld/player_logic.py b/apworld/player_logic.py index 317d13b..c94b809 100644 --- a/apworld/player_logic.py +++ b/apworld/player_logic.py @@ -130,6 +130,9 @@ class Lingo2PlayerLogic: elif door_group.type == data_pb2.DoorGroupType.COLOR_CONNECTOR: if not self.world.options.shuffle_control_center_colors: continue + elif door_group.type == data_pb2.DoorGroupType.SHUFFLE_GROUP: + if not self.world.options.shuffle_doors: + continue else: continue diff --git a/data/door_groups.txtpb b/data/door_groups.txtpb index a90bc9a..1a75c45 100644 --- a/data/door_groups.txtpb +++ b/data/door_groups.txtpb @@ -138,3 +138,23 @@ door_groups { name: "Cyan Doors" } } +door_groups { + name: "Lavender Cubes" + type: SHUFFLE_GROUP + doors { + map: "daedalus" + name: "C Keyholder Blocker" + } + doors { + map: "the_congruent" + name: "T Keyholder Blocker" + } + doors { + map: "the_great" + name: "Lavender Cube" + } + doors { + map: "the_parthenon" + name: "Lavender Cubes" + } +} diff --git a/data/ids.yaml b/data/ids.yaml index 4e2cd66..e2ec985 100644 --- a/data/ids.yaml +++ b/data/ids.yaml @@ -1484,7 +1484,6 @@ maps: Obverse Magenta Door: 173 Obverse Yellow Door: 178 Obverse Yellow Puzzles: 179 - T Keyholder Blocker: 183 the_darkroom: rooms: First Room: @@ -2084,7 +2083,6 @@ maps: Into The Mouth Gravestone: 457 Invisible Entrance: 465 Jail Entrance: 451 - Lavender Cube: 469 Magnet Room Entrance: 449 Nature Room Door: 466 Nature Room Panels: 467 @@ -3847,5 +3845,6 @@ door_groups: Control Center Purple Doors: 2785 Control Center White Doors: 2784 Cyan Doors: 2789 + Lavender Cubes: 2790 The Entry - Repetitive Entrance: 2782 The Repetitive - Plaza Entrance: 2783 diff --git a/data/maps/daedalus/doors.txtpb b/data/maps/daedalus/doors.txtpb index d6c33f4..ccbf3f0 100644 --- a/data/maps/daedalus/doors.txtpb +++ b/data/maps/daedalus/doors.txtpb @@ -2112,8 +2112,12 @@ doors { doors { name: "C Keyholder Blocker" type: EVENT - # Components/Doors/Unincorporated/temple_foyer_7 - switches: "lavender_cubes" + receivers: "Components/Doors/Unincorporated/temple_foyer_7" + panels { + map: "the_ancient" + room: "Inside" + name: "COLOR" + } } doors { name: "Computer Room Back Door" diff --git a/data/maps/the_ancient/doors.txtpb b/data/maps/the_ancient/doors.txtpb index 5dc062e..e550306 100644 --- a/data/maps/the_ancient/doors.txtpb +++ b/data/maps/the_ancient/doors.txtpb @@ -38,7 +38,8 @@ doors { } doors { name: "Lavender Cubes" - type: STANDARD + type: LOCATION_ONLY panels { room: "Inside" name: "COLOR" } location_room: "Inside" + location_name: "COLOR" } diff --git a/data/maps/the_ancient/rooms/Inside.txtpb b/data/maps/the_ancient/rooms/Inside.txtpb index d6e8575..3723b2d 100644 --- a/data/maps/the_ancient/rooms/Inside.txtpb +++ b/data/maps/the_ancient/rooms/Inside.txtpb @@ -5,5 +5,4 @@ panels { clue: "color" answer: "lavender" symbols: EXAMPLE - # TODO: how does this connect to the "lavender_cubes" switch? } diff --git a/data/maps/the_congruent/doors.txtpb b/data/maps/the_congruent/doors.txtpb index 7c79c00..a714eba 100644 --- a/data/maps/the_congruent/doors.txtpb +++ b/data/maps/the_congruent/doors.txtpb @@ -119,7 +119,11 @@ doors { } doors { name: "T Keyholder Blocker" - type: ITEM_ONLY + type: EVENT receivers: "Components/Doors/magenta_enterer3" - switches: "lavender_cubes" + panels { + map: "the_ancient" + room: "Inside" + name: "COLOR" + } } diff --git a/data/maps/the_great/doors.txtpb b/data/maps/the_great/doors.txtpb index 0389a38..f0f2fde 100644 --- a/data/maps/the_great/doors.txtpb +++ b/data/maps/the_great/doors.txtpb @@ -471,9 +471,13 @@ doors { } doors { name: "Lavender Cube" - type: ITEM_ONLY + type: EVENT receivers: "Components/Doors/entry_28" - switches: "lavender_cubes" + panels { + map: "the_ancient" + room: "Inside" + name: "COLOR" + } } doors { name: "Zero Entrance" diff --git a/data/maps/the_parthenon/doors.txtpb b/data/maps/the_parthenon/doors.txtpb index 5187aea..1161917 100644 --- a/data/maps/the_parthenon/doors.txtpb +++ b/data/maps/the_parthenon/doors.txtpb @@ -13,7 +13,12 @@ doors { doors { name: "Lavender Cubes" type: EVENT - switches: "lavender_cubes" + receivers: "Components/Doors/entry_3" + panels { + map: "the_ancient" + room: "Inside" + name: "COLOR" + } } doors { name: "K2 Door" diff --git a/proto/data.proto b/proto/data.proto index 24b98fe..014cbeb 100644 --- a/proto/data.proto +++ b/proto/data.proto @@ -44,6 +44,9 @@ enum DoorGroupType { // Groups with this type become an item if cyan door behavior is set to item. CYAN_DOORS = 3; + + // Groups with this type always become an item if door shuffle is on. + SHUFFLE_GROUP = 4; } enum AxisDirection { @@ -119,7 +122,6 @@ message Door { optional uint64 complete_at = 12; optional string control_center_color = 6; - repeated string switches = 7; repeated KeyholderAnswer keyholders = 13; repeated uint64 rooms = 14; repeated uint64 doors = 15; diff --git a/proto/human.proto b/proto/human.proto index 89fd076..d48f687 100644 --- a/proto/human.proto +++ b/proto/human.proto @@ -86,7 +86,6 @@ message HumanDoor { optional uint64 complete_at = 9; optional string control_center_color = 6; - repeated string switches = 7; repeated KeyholderIdentifier keyholders = 10; repeated RoomIdentifier rooms = 11; repeated DoorIdentifier doors = 12; diff --git a/tools/datapacker/main.cpp b/tools/datapacker/main.cpp index c72462d..c640de6 100644 --- a/tools/datapacker/main.cpp +++ b/tools/datapacker/main.cpp @@ -344,9 +344,6 @@ class DataPacker { std::copy( h_door.receivers().begin(), h_door.receivers().end(), google::protobuf::RepeatedFieldBackInserter(door.mutable_receivers())); - std::copy( - h_door.switches().begin(), h_door.switches().end(), - google::protobuf::RepeatedFieldBackInserter(door.mutable_switches())); for (const PaintingIdentifier& pi : h_door.move_paintings()) { std::optional map_name = -- cgit 1.4.1