diff options
| author | Star Rauchenberger <fefferburbia@gmail.com> | 2026-02-06 13:45:01 -0500 |
|---|---|---|
| committer | Star Rauchenberger <fefferburbia@gmail.com> | 2026-02-06 13:45:01 -0500 |
| commit | 27a1d63608cc370cdf491ae08c70c74f76956367 (patch) | |
| tree | 3e1dbbfedc130e17eb8b0da575671e8f99c98a1e /apworld/player_logic.py | |
| parent | bde801d654ce6ddc41f703e55adfcc33b3f3104e (diff) | |
| parent | 2a3916c1c58e033b06042d5d5413ea85cd94babf (diff) | |
| download | lingo2-archipelago-27a1d63608cc370cdf491ae08c70c74f76956367.tar.gz lingo2-archipelago-27a1d63608cc370cdf491ae08c70c74f76956367.tar.bz2 lingo2-archipelago-27a1d63608cc370cdf491ae08c70c74f76956367.zip | |
Merge branch 'main' of fourisland.com:/srv/git/lingo2-archipelago
Diffstat (limited to 'apworld/player_logic.py')
| -rw-r--r-- | apworld/player_logic.py | 16 |
1 files changed, 15 insertions, 1 deletions
| diff --git a/apworld/player_logic.py b/apworld/player_logic.py index b946296..a02856e 100644 --- a/apworld/player_logic.py +++ b/apworld/player_logic.py | |||
| @@ -5,7 +5,7 @@ from .generated import data_pb2 as data_pb2 | |||
| 5 | from .items import SYMBOL_ITEMS | 5 | from .items import SYMBOL_ITEMS |
| 6 | from typing import TYPE_CHECKING, NamedTuple | 6 | from typing import TYPE_CHECKING, NamedTuple |
| 7 | 7 | ||
| 8 | from .options import ShuffleLetters, CyanDoorBehavior, VictoryCondition | 8 | from .options import ShuffleLetters, CyanDoorBehavior, VictoryCondition, FastTravelAccess |
| 9 | 9 | ||
| 10 | if TYPE_CHECKING: | 10 | if TYPE_CHECKING: |
| 11 | from . import Lingo2World | 11 | from . import Lingo2World |
| @@ -221,6 +221,7 @@ class Lingo2PlayerLogic: | |||
| 221 | 221 | ||
| 222 | double_letter_amount: dict[str, int] | 222 | double_letter_amount: dict[str, int] |
| 223 | goal_room_id: int | 223 | goal_room_id: int |
| 224 | rte_mapping: list[int] | ||
| 224 | 225 | ||
| 225 | def __init__(self, world: "Lingo2World"): | 226 | def __init__(self, world: "Lingo2World"): |
| 226 | self.world = world | 227 | self.world = world |
| @@ -304,6 +305,19 @@ class Lingo2PlayerLogic: | |||
| 304 | if "The Fuzzy" in world.options.enable_gift_maps.value: | 305 | if "The Fuzzy" in world.options.enable_gift_maps.value: |
| 305 | self.real_items.append("Numbers") | 306 | self.real_items.append("Numbers") |
| 306 | 307 | ||
| 308 | if world.options.shuffle_fast_travel: | ||
| 309 | travelable_maps = [map_id for map_id in self.shuffled_maps | ||
| 310 | if world.static_logic.objects.maps[map_id].HasField("rte_room")] | ||
| 311 | self.rte_mapping = world.random.sample(travelable_maps, 4) | ||
| 312 | else: | ||
| 313 | canonical_rtes = ["the_plaza", "the_gallery", "daedalus", "control_center"] | ||
| 314 | self.rte_mapping = [world.static_logic.map_id_by_name[map_name] for map_name in canonical_rtes | ||
| 315 | if world.static_logic.map_id_by_name[map_name] in self.shuffled_maps] | ||
| 316 | |||
| 317 | if world.options.fast_travel_access == FastTravelAccess.option_items: | ||
| 318 | for rte_map in self.rte_mapping: | ||
| 319 | self.real_items.append(world.static_logic.get_map_rte_item_name(rte_map)) | ||
| 320 | |||
| 307 | if self.world.options.shuffle_doors: | 321 | if self.world.options.shuffle_doors: |
| 308 | for progressive in world.static_logic.objects.progressives: | 322 | for progressive in world.static_logic.objects.progressives: |
| 309 | for i in range(0, len(progressive.doors)): | 323 | for i in range(0, len(progressive.doors)): |
