Timespinner: RC bug, lake serene is dry, when Rising Tides is off (#1570)

* Tinmespinner: RC bug, lake serene is dry, when Rising Tides is off

* yes
This commit is contained in:
Jarno 2023-03-22 11:32:37 +01:00 committed by GitHub
parent 5977e401d5
commit 95b01def6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 24 additions and 15 deletions

View File

@ -20,6 +20,7 @@ class PreCalculatedWeights:
dry_lake_serene: bool dry_lake_serene: bool
def __init__(self, world: MultiWorld, player: int): def __init__(self, world: MultiWorld, player: int):
if world and is_option_enabled(world, player, "RisingTides"):
weights_overrrides: Dict[str, Union[str, Dict[str, int]]] = self.get_flood_weights_overrides(world, player) weights_overrrides: Dict[str, Union[str, Dict[str, int]]] = self.get_flood_weights_overrides(world, player)
self.flood_basement, self.flood_basement_high = \ self.flood_basement, self.flood_basement_high = \
@ -33,6 +34,17 @@ class PreCalculatedWeights:
self.flood_lake_desolation, _ = self.roll_flood_setting(world, player, weights_overrrides, "LakeDesolation") self.flood_lake_desolation, _ = self.roll_flood_setting(world, player, weights_overrrides, "LakeDesolation")
flood_lake_serene, _ = self.roll_flood_setting(world, player, weights_overrrides, "LakeSerene") flood_lake_serene, _ = self.roll_flood_setting(world, player, weights_overrrides, "LakeSerene")
self.dry_lake_serene = not flood_lake_serene self.dry_lake_serene = not flood_lake_serene
else:
self.flood_basement = False
self.flood_basement_high = False
self.flood_xarion = False
self.flood_maw = False
self.flood_pyramid_shaft = False
self.flood_pyramid_back = False
self.flood_moat = False
self.flood_courtyard = False
self.flood_lake_desolation = False
self.dry_lake_serene = False
self.pyramid_keys_unlock, self.present_key_unlock, self.past_key_unlock, self.time_key_unlock = \ self.pyramid_keys_unlock, self.present_key_unlock, self.past_key_unlock, self.time_key_unlock = \
self.get_pyramid_keys_unlocks(world, player, self.flood_maw) self.get_pyramid_keys_unlocks(world, player, self.flood_maw)
@ -106,9 +118,6 @@ class PreCalculatedWeights:
def roll_flood_setting(world: MultiWorld, player: int, def roll_flood_setting(world: MultiWorld, player: int,
all_weights: Dict[str, Union[Dict[str, int], str]], key: str) -> Tuple[bool, bool]: all_weights: Dict[str, Union[Dict[str, int], str]], key: str) -> Tuple[bool, bool]:
if not world or not is_option_enabled(world, player, "RisingTides"):
return False, False
weights: Union[Dict[str, int], str] = all_weights[key] weights: Union[Dict[str, int], str] = all_weights[key]
if isinstance(weights, dict): if isinstance(weights, dict):