diff options
| author | Star Rauchenberger <fefferburbia@gmail.com> | 2025-09-07 15:42:00 -0400 |
|---|---|---|
| committer | Star Rauchenberger <fefferburbia@gmail.com> | 2025-09-07 15:42:00 -0400 |
| commit | d79984b099c3f762b95d3b4257bef113d3a8d6ee (patch) | |
| tree | bcb647c4734b9ddecb465f818e06efc899482f4e /apworld/player_logic.py | |
| parent | 8ab6132f99e9a033c170310b2d88a7312e46a153 (diff) | |
| download | lingo2-archipelago-d79984b099c3f762b95d3b4257bef113d3a8d6ee.tar.gz lingo2-archipelago-d79984b099c3f762b95d3b4257bef113d3a8d6ee.tar.bz2 lingo2-archipelago-d79984b099c3f762b95d3b4257bef113d3a8d6ee.zip | |
Added door groups
Diffstat (limited to 'apworld/player_logic.py')
| -rw-r--r-- | apworld/player_logic.py | 35 |
1 files changed, 29 insertions, 6 deletions
| diff --git a/apworld/player_logic.py b/apworld/player_logic.py index 5cb9011..ce9a4e5 100644 --- a/apworld/player_logic.py +++ b/apworld/player_logic.py | |||
| @@ -123,16 +123,39 @@ class Lingo2PlayerLogic: | |||
| 123 | self.item_by_door[progressive.doors[i]] = (progressive.name, i + 1) | 123 | self.item_by_door[progressive.doors[i]] = (progressive.name, i + 1) |
| 124 | self.real_items.append(progressive.name) | 124 | self.real_items.append(progressive.name) |
| 125 | 125 | ||
| 126 | for door_group in world.static_logic.objects.door_groups: | ||
| 127 | if door_group.type == data_pb2.DoorGroupType.CONNECTOR and not self.world.options.shuffle_doors: | ||
| 128 | continue | ||
| 129 | |||
| 130 | if (door_group.type == data_pb2.DoorGroupType.COLOR_CONNECTOR and | ||
| 131 | not self.world.options.shuffle_control_center_colors): | ||
| 132 | continue | ||
| 133 | |||
| 134 | for door in door_group.doors: | ||
| 135 | self.item_by_door[door] = (door_group.name, 1) | ||
| 136 | |||
| 137 | self.real_items.append(door_group.name) | ||
| 138 | |||
| 126 | # We iterate through the doors in two parts because it is essential that we determine which doors are shuffled | 139 | # We iterate through the doors in two parts because it is essential that we determine which doors are shuffled |
| 127 | # before we calculate any access requirements. | 140 | # before we calculate any access requirements. |
| 128 | for door in world.static_logic.objects.doors: | 141 | for door in world.static_logic.objects.doors: |
| 129 | if door.type in [data_pb2.DoorType.STANDARD, data_pb2.DoorType.ITEM_ONLY] and self.world.options.shuffle_doors: | 142 | if door.type in [data_pb2.DoorType.EVENT, data_pb2.DoorType.LOCATION_ONLY, data_pb2.DoorType.GRAVESTONE]: |
| 130 | if door.id in self.item_by_door: | 143 | continue |
| 131 | continue | 144 | |
| 145 | if door.id in self.item_by_door: | ||
| 146 | continue | ||
| 147 | |||
| 148 | if (door.type in [data_pb2.DoorType.STANDARD, data_pb2.DoorType.ITEM_ONLY] and | ||
| 149 | not self.world.options.shuffle_doors): | ||
| 150 | continue | ||
| 151 | |||
| 152 | if (door.type == data_pb2.DoorType.CONTROL_CENTER_COLOR and | ||
| 153 | not self.world.options.shuffle_control_center_colors): | ||
| 154 | continue | ||
| 132 | 155 | ||
| 133 | door_item_name = self.world.static_logic.get_door_item_name(door) | 156 | door_item_name = self.world.static_logic.get_door_item_name(door) |
| 134 | self.item_by_door[door.id] = (door_item_name, 1) | 157 | self.item_by_door[door.id] = (door_item_name, 1) |
| 135 | self.real_items.append(door_item_name) | 158 | self.real_items.append(door_item_name) |
| 136 | 159 | ||
| 137 | for door in world.static_logic.objects.doors: | 160 | for door in world.static_logic.objects.doors: |
| 138 | if door.type in [data_pb2.DoorType.STANDARD, data_pb2.DoorType.LOCATION_ONLY, data_pb2.DoorType.GRAVESTONE]: | 161 | if door.type in [data_pb2.DoorType.STANDARD, data_pb2.DoorType.LOCATION_ONLY, data_pb2.DoorType.GRAVESTONE]: |
