From bed3397a3acb42104cbf085455954313178d8433 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Wed, 3 Sep 2025 21:51:34 -0400 Subject: Added option for Daedalus roof access logic --- apworld/__init__.py | 1 + apworld/options.py | 11 + apworld/regions.py | 3 + data/connections.txtpb | 1 + data/maps/daedalus/connections.txtpb | 312 +++++++++++++++++++++ data/maps/daedalus/rooms/Orange Room Hallway.txtpb | 4 + proto/data.proto | 2 + proto/human.proto | 4 + tools/datapacker/main.cpp | 5 + 9 files changed, 343 insertions(+) create mode 100644 data/maps/daedalus/rooms/Orange Room Hallway.txtpb diff --git a/apworld/__init__.py b/apworld/__init__.py index 1f1e6fe..7ebdf56 100644 --- a/apworld/__init__.py +++ b/apworld/__init__.py @@ -65,6 +65,7 @@ class Lingo2World(World): def fill_slot_data(self): slot_options = [ + "daedalus_roof_access", "keyholder_sanity", "shuffle_doors", "victory_condition", diff --git a/apworld/options.py b/apworld/options.py index dacbc46..3216dff 100644 --- a/apworld/options.py +++ b/apworld/options.py @@ -17,6 +17,16 @@ class KeyholderSanity(Toggle): display_name = "Keyholder Sanity" +class DaedalusRoofAccess(Toggle): + """ + If enabled, the player will be logically expected to be able to go from the castle entrance to any part of Daedalus + that is open to the air. If disabled, the player will only be expected to be able to enter the castle, the moat, + Icarus, and the area at the bottom of the stairs. Invisible walls that become opaque as you approach them are added + to the level to prevent the player from accidentally breaking logic. + """ + display_name = "Allow Daedalus Roof Access" + + class VictoryCondition(Choice): """Victory condition.""" display_name = "Victory Condition" @@ -39,4 +49,5 @@ class VictoryCondition(Choice): class Lingo2Options(PerGameCommonOptions): shuffle_doors: ShuffleDoors keyholder_sanity: KeyholderSanity + daedalus_roof_access: DaedalusRoofAccess victory_condition: VictoryCondition diff --git a/apworld/regions.py b/apworld/regions.py index fe2c99b..e30493c 100644 --- a/apworld/regions.py +++ b/apworld/regions.py @@ -41,6 +41,9 @@ def create_regions(world: "Lingo2World"): # TODO: The requirements of the opposite trigger also matter. for connection in world.static_logic.objects.connections: + if connection.roof_access and not world.options.daedalus_roof_access: + continue + from_region = world.static_logic.get_room_region_name(connection.from_room) to_region = world.static_logic.get_room_region_name(connection.to_room) connection_name = f"{from_region} -> {to_region}" diff --git a/data/connections.txtpb b/data/connections.txtpb index f1b81d5..a79778f 100644 --- a/data/connections.txtpb +++ b/data/connections.txtpb @@ -1193,6 +1193,7 @@ connections { } } oneway: true + roof_access: true } connections { from { diff --git a/data/maps/daedalus/connections.txtpb b/data/maps/daedalus/connections.txtpb index 223710a..09613ae 100644 --- a/data/maps/daedalus/connections.txtpb +++ b/data/maps/daedalus/connections.txtpb @@ -535,6 +535,11 @@ connections { } connections { from_room: "Z2 Room" + to_room: "Orange Room Hallway" + door { name: "Z2 Room Southeast Door" } +} +connections { + from_room: "Orange Room Hallway" to_room: "Orange Room" door { name: "Z2 Room Southeast Door" } } @@ -1545,3 +1550,310 @@ connections { to_room: "Pyramid Top" door { name: "Pyramid Third Floor Door" } } +connections { + from_room: "Roof" + to_room: "After Bee Room" + oneway: true + roof_access: true +} +connections { + from_room: "Roof" + to_room: "Amber North 2" + oneway: true + roof_access: true +} +connections { + from_room: "Roof" + to_room: "Black Hex" + oneway: true + roof_access: true +} +connections { + from_room: "Roof" + to_room: "Blue Hallway Tall Side" + oneway: true + roof_access: true +} +connections { + from_room: "Roof" + to_room: "Blue Hallway" + oneway: true + roof_access: true +} +# Blue Hallway Cut Side is inside. +connections { + from_room: "Roof" + to_room: "Eye Painting" + oneway: true + roof_access: true +} +connections { + from_room: "Roof" + to_room: "Globe Room" + oneway: true + roof_access: true +} +connections { + from_room: "Roof" + to_room: "Gray Color Door" + oneway: true + roof_access: true +} +connections { + from_room: "Roof" + to_room: "Green Color Door" + oneway: true + roof_access: true +} +connections { + from_room: "Roof" + to_room: "Green Smiley" + oneway: true + roof_access: true +} +connections { + from_room: "Roof" + to_room: "Hedges" + oneway: true + roof_access: true +} +connections { + from_room: "Roof" + to_room: "Maze Paintings Area" + oneway: true + roof_access: true +} +connections { + from_room: "Roof" + to_room: "Maze" + oneway: true + roof_access: true +} +connections { + from_room: "Roof" + to_room: "North Castle Area" + oneway: true + roof_access: true +} +connections { + from_room: "Roof" + to_room: "Number Paintings Area" + oneway: true + roof_access: true +} +connections { + from_room: "Roof" + to_room: "Orange Room Hallway" + oneway: true + roof_access: true +} +connections { + from_room: "Roof" + to_room: "Outside Book Room" + oneway: true + roof_access: true +} +connections { + from_room: "Roof" + to_room: "Outside Eye Temple" + oneway: true + roof_access: true +} +connections { + from_room: "Roof" + to_room: "Outside Hedges" + oneway: true + roof_access: true +} +connections { + from_room: "Roof" + to_room: "Outside Hotel" + oneway: true + roof_access: true +} +connections { + from_room: "Roof" + to_room: "Outside House" + oneway: true + roof_access: true +} +connections { + from_room: "Roof" + to_room: "Outside Magic Room" + oneway: true + roof_access: true +} +connections { + from_room: "Roof" + to_room: "Outside Orange Room" + oneway: true + roof_access: true +} +connections { + from_room: "Roof" + to_room: "Outside Pyramid" + oneway: true + roof_access: true +} +connections { + from_room: "Roof" + to_room: "Outside Red Room" + oneway: true + roof_access: true +} +connections { + from_room: "Roof" + to_room: "Outside Salt Room" + oneway: true + roof_access: true +} +connections { + from_room: "Roof" + to_room: "Outside Snake Room" + oneway: true + roof_access: true +} +connections { + from_room: "Roof" + to_room: "Post Orange Smiley Three Way" + oneway: true + roof_access: true +} +connections { + from_room: "Roof" + to_room: "Purple NW Vestibule" + oneway: true + roof_access: true +} +connections { + from_room: "Roof" + to_room: "Purple Room East" + oneway: true + roof_access: true +} +connections { + from_room: "Roof" + to_room: "Purple Room South" + oneway: true + roof_access: true +} +connections { + from_room: "Roof" + to_room: "Purple Room West" + oneway: true + roof_access: true +} +connections { + from_room: "Roof" + to_room: "Purple SE Vestibule" + oneway: true + roof_access: true +} +connections { + from_room: "Roof" + to_room: "Pyramid Second Floor" + oneway: true + roof_access: true +} +connections { + from_room: "Roof" + to_room: "Pyramid Top" + oneway: true + roof_access: true +} +connections { + from_room: "Roof" + to_room: "Quiet Entrance" + oneway: true + roof_access: true +} +connections { + from_room: "Roof" + to_room: "Red Color Door" + oneway: true + roof_access: true +} +connections { + from_room: "Roof" + to_room: "South Castle Area" + oneway: true + roof_access: true +} +connections { + from_room: "Roof" + to_room: "Starting Room" + oneway: true + roof_access: true +} +connections { + from_room: "Roof" + to_room: "Sweet Foyer" + oneway: true + roof_access: true +} +connections { + from_room: "Roof" + to_room: "Tree Entrance" + oneway: true + roof_access: true +} +connections { + from_room: "Roof" + to_room: "West Castle Area" + oneway: true + roof_access: true +} +connections { + from_room: "Roof" + to_room: "West Spire" + oneway: true + roof_access: true +} +connections { + from_room: "Roof" + to_room: "Yellow Color Door" + oneway: true + roof_access: true +} +connections { + from_room: "Roof" + to_room: "Z2 Room" + oneway: true + roof_access: true +} +connections { + from_room: "Roof" + to_room: "Zoo Center" + oneway: true + roof_access: true +} +connections { + from_room: "Roof" + to_room: "Zoo E" + oneway: true + roof_access: true +} +connections { + from_room: "Roof" + to_room: "Zoo N" + oneway: true + roof_access: true +} +connections { + from_room: "Roof" + to_room: "Zoo NE" + oneway: true + roof_access: true +} +connections { + from_room: "Roof" + to_room: "Zoo S" + oneway: true + roof_access: true +} +connections { + from_room: "Roof" + to_room: "Zoo SE" + oneway: true + roof_access: true +} diff --git a/data/maps/daedalus/rooms/Orange Room Hallway.txtpb b/data/maps/daedalus/rooms/Orange Room Hallway.txtpb new file mode 100644 index 0000000..915e698 --- /dev/null +++ b/data/maps/daedalus/rooms/Orange Room Hallway.txtpb @@ -0,0 +1,4 @@ +name: "Orange Room Hallway" +panel_display_name: "Orange Room" +# This has the same door at both sides, and mainly just connects Z2 Room and +# Orange Room. It's separate because you can also get here from the Roof. diff --git a/proto/data.proto b/proto/data.proto index 9cdf5fd..855c28c 100644 --- a/proto/data.proto +++ b/proto/data.proto @@ -84,6 +84,8 @@ message Connection { uint64 painting = 5; ProxyIdentifier panel = 6; } + + optional bool roof_access = 7; } message Door { diff --git a/proto/human.proto b/proto/human.proto index e0378cc..205b867 100644 --- a/proto/human.proto +++ b/proto/human.proto @@ -62,6 +62,10 @@ message HumanConnection { optional bool oneway = 3; optional DoorIdentifier door = 4; + + // If true, this connection will only be logically allowed if the Daedalus + // Roof Access option is enabled. + optional bool roof_access = 7; } message HumanConnections { diff --git a/tools/datapacker/main.cpp b/tools/datapacker/main.cpp index d7e0b69..595647d 100644 --- a/tools/datapacker/main.cpp +++ b/tools/datapacker/main.cpp @@ -466,6 +466,11 @@ class DataPacker { r_connection.set_required_door(door_id); } + if (human_connection.has_roof_access()) { + f_connection.set_roof_access(human_connection.roof_access()); + r_connection.set_roof_access(human_connection.roof_access()); + } + container_.AddConnection(f_connection); if (!human_connection.oneway()) { container_.AddConnection(r_connection); -- cgit 1.4.1