From f06d107a7469e172686d682a74ded0d800278339 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sun, 26 Oct 2025 09:14:21 -0400 Subject: Added backwards compatibility with removed locations --- apworld/player_logic.py | 3 ++- apworld/static_logic.py | 3 ++- data/ids.yaml | 3 +++ data/maps/the_partial/doors.txtpb | 3 ++- data/maps/the_relentless/doors.txtpb | 6 ++++-- proto/data.proto | 3 +++ tools/validator/validator.cpp | 3 ++- 7 files changed, 18 insertions(+), 6 deletions(-) diff --git a/apworld/player_logic.py b/apworld/player_logic.py index d7b18c2..043268e 100644 --- a/apworld/player_logic.py +++ b/apworld/player_logic.py @@ -299,7 +299,8 @@ class Lingo2PlayerLogic: if door.map_id not in self.shuffled_maps: continue - if door.type in [data_pb2.DoorType.EVENT, data_pb2.DoorType.LOCATION_ONLY, data_pb2.DoorType.GRAVESTONE]: + if door.type in [data_pb2.DoorType.EVENT, data_pb2.DoorType.LOCATION_ONLY, data_pb2.DoorType.GRAVESTONE, + data_pb2.DoorType.LEGACY_LOCATION]: continue if door.id in self.item_by_door: diff --git a/apworld/static_logic.py b/apworld/static_logic.py index 8e07b82..702f30b 100644 --- a/apworld/static_logic.py +++ b/apworld/static_logic.py @@ -31,7 +31,8 @@ class Lingo2StaticLogic: location_name = self.get_door_location_name(door) self.location_id_to_name[door.ap_id] = location_name - if door.type not in [data_pb2.DoorType.EVENT, data_pb2.DoorType.LOCATION_ONLY, data_pb2.DoorType.GRAVESTONE]: + if door.type not in [data_pb2.DoorType.EVENT, data_pb2.DoorType.LOCATION_ONLY, data_pb2.DoorType.GRAVESTONE, + data_pb2.DoorType.LEGACY_LOCATION]: item_name = self.get_door_item_name(door) self.item_id_to_name[door.ap_id] = item_name diff --git a/data/ids.yaml b/data/ids.yaml index 6a44044..49dd23f 100644 --- a/data/ids.yaml +++ b/data/ids.yaml @@ -2789,6 +2789,7 @@ maps: FINCH: 886 FOUR: 885 doors: + Control Center Entrance: 865 F Door: 866 L Entered: 2843 Main Room Puzzles: 863 @@ -2974,8 +2975,10 @@ maps: MORE: 1022 doors: Left Only Puzzles: 3020 + Left/Turn Door: 984 Shop Only Puzzles: 3019 Turn Only Puzzles: 3018 + Turn/Shop Door: 985 the_repetitive: rooms: Anti Room: diff --git a/data/maps/the_partial/doors.txtpb b/data/maps/the_partial/doors.txtpb index b6445cd..11826ea 100644 --- a/data/maps/the_partial/doors.txtpb +++ b/data/maps/the_partial/doors.txtpb @@ -49,9 +49,10 @@ doors { } doors { name: "Control Center Entrance" - type: EVENT + type: LEGACY_LOCATION #receivers: "Components/Doors/controlDoor" panels { room: "Control Center Entrance" name: "RETURN" } + location_room: "Control Center Entrance" } doors { name: "F Door" diff --git a/data/maps/the_relentless/doors.txtpb b/data/maps/the_relentless/doors.txtpb index 727599f..e970e40 100644 --- a/data/maps/the_relentless/doors.txtpb +++ b/data/maps/the_relentless/doors.txtpb @@ -26,17 +26,18 @@ doors { } doors { name: "Left/Turn Door" - type: EVENT + type: LEGACY_LOCATION panels { room: "Left Room" name: "HIDE" } panels { room: "Left Room" name: "LEFT" } panels { room: "Left Room" name: "MORE" } panels { room: "Turn Room" name: "HIDE (1)" } panels { room: "Turn Room" name: "HIDE (2)" } panels { room: "Turn Room" name: "MORE" } + location_room: "Turn Room" } doors { name: "Turn/Shop Door" - type: EVENT + type: LEGACY_LOCATION panels { room: "Turn Room" name: "HIDE (1)" } panels { room: "Turn Room" name: "HIDE (2)" } panels { room: "Turn Room" name: "MORE" } @@ -45,6 +46,7 @@ doors { panels { room: "Shop Room" name: "EXIT (1)" } panels { room: "Shop Room" name: "EXIT (2)" } panels { room: "Shop Room" name: "EXIT (3)" } + location_room: "Turn Room" } doors { name: "All Doors" diff --git a/proto/data.proto b/proto/data.proto index b46ab99..d84c598 100644 --- a/proto/data.proto +++ b/proto/data.proto @@ -30,6 +30,9 @@ enum DoorType { // This door is never a location, and is an item as long as gallery painting shuffle is on. GALLERY_PAINTING = 7; + + // This location is not added to new worlds, but the client can send it out for backwards compataibility purposes. + LEGACY_LOCATION = 8; } enum DoorGroupType { diff --git a/tools/validator/validator.cpp b/tools/validator/validator.cpp index e1fc138..5f8e0ba 100644 --- a/tools/validator/validator.cpp +++ b/tools/validator/validator.cpp @@ -227,7 +227,8 @@ class Validator { if (h_door.type() == DoorType::STANDARD || h_door.type() == DoorType::LOCATION_ONLY || - h_door.type() == DoorType::GRAVESTONE) { + h_door.type() == DoorType::GRAVESTONE || + h_door.type() == DoorType::LEGACY_LOCATION) { if (h_door.double_letters()) { std::cout << "Door " << door_identifier.ShortDebugString() << " is a location that depends on double_letters." -- cgit 1.4.1