From 53340ab22cd34d2021f959c8ea0a3120305ceced Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Tue, 15 Feb 2022 06:29:57 +0100 Subject: [PATCH] Core: remove legacy "dynamic_regions", as all regions are now dynamic --- BaseClasses.py | 2 -- Fill.py | 3 ++- worlds/alttp/ItemPool.py | 4 ---- worlds/alttp/Shops.py | 1 - 4 files changed, 2 insertions(+), 8 deletions(-) diff --git a/BaseClasses.py b/BaseClasses.py index 61bbcb10..e617f929 100644 --- a/BaseClasses.py +++ b/BaseClasses.py @@ -80,8 +80,6 @@ class MultiWorld(): self.custom = False self.customitemarray = [] self.shuffle_ganon = True - self.dynamic_regions = [] - self.dynamic_locations = [] self.spoiler = Spoiler(self) self.fix_trock_doors = self.AttributeProxy( lambda player: self.shuffle[player] != 'vanilla' or self.mode[player] == 'inverted') diff --git a/Fill.py b/Fill.py index d90ac0a7..94a99380 100644 --- a/Fill.py +++ b/Fill.py @@ -431,7 +431,8 @@ def swap_location_item(location_1: Location, location_2: Location, check_locked= location_1.item.location = location_1 location_2.item.location = location_2 location_1.event, location_2.event = location_2.event, location_1.event - + + def distribute_planned(world: MultiWorld): def warn(warning: str, force): if force in [True, 'fail', 'failure', 'none', False, 'warn', 'warning']: diff --git a/worlds/alttp/ItemPool.py b/worlds/alttp/ItemPool.py index 1d224569..f20379c8 100644 --- a/worlds/alttp/ItemPool.py +++ b/worlds/alttp/ItemPool.py @@ -290,7 +290,6 @@ def generate_itempool(world): loc.access_rule = lambda state: state.has_triforce_pieces(state.world.treasure_hunt_count[player], player) region.locations.append(loc) - world.dynamic_locations.append(loc) world.clear_location_cache() world.push_item(loc, ItemFactory('Triforce', player), False) @@ -474,7 +473,6 @@ def set_up_take_anys(world, player): old_man_take_any = Region("Old Man Sword Cave", RegionType.Cave, 'the sword cave', player) world.regions.append(old_man_take_any) - world.dynamic_regions.append(old_man_take_any) reg = regions.pop() entrance = world.get_region(reg, player).entrances[0] @@ -495,7 +493,6 @@ def set_up_take_anys(world, player): for num in range(4): take_any = Region("Take-Any #{}".format(num+1), RegionType.Cave, 'a cave of choice', player) world.regions.append(take_any) - world.dynamic_regions.append(take_any) target, room_id = world.random.choice([(0x58, 0x0112), (0x60, 0x010F), (0x46, 0x011F)]) reg = regions.pop() @@ -519,7 +516,6 @@ def create_dynamic_shop_locations(world, player): if item['create_location']: loc = ALttPLocation(player, f"{shop.region.name} {shop.slot_names[i]}", parent=shop.region) shop.region.locations.append(loc) - world.dynamic_locations.append(loc) world.clear_location_cache() diff --git a/worlds/alttp/Shops.py b/worlds/alttp/Shops.py index 29401117..b16eff3c 100644 --- a/worlds/alttp/Shops.py +++ b/worlds/alttp/Shops.py @@ -337,7 +337,6 @@ def create_shops(world, player: int): loc.shop_slot_disabled = True loc.item.world = world shop.region.locations.append(loc) - world.dynamic_locations.append(loc) world.clear_location_cache()