LTTP: remove multiworld = None (#2290)

This commit is contained in:
Aaron Wagener
2024-03-10 01:18:25 -06:00
committed by GitHub
parent 4ce58c0240
commit 939a5ec959
17 changed files with 122 additions and 122 deletions

View File

@@ -2,7 +2,7 @@ from BaseClasses import CollectionState, ItemClassification
from worlds.alttp.Dungeons import get_dungeon_item_pool
from worlds.alttp.EntranceShuffle import mandatory_connections, connect_simple
from worlds.alttp.ItemPool import difficulties
from worlds.alttp.Items import ItemFactory
from worlds.alttp.Items import item_factory
from worlds.alttp.Regions import create_regions
from worlds.alttp.Shops import create_shops
from worlds.alttp.test import LTTPTestBase
@@ -24,10 +24,10 @@ class TestDungeon(LTTPTestBase):
connect_simple(self.multiworld, 'Big Bomb Shop', 'Big Bomb Shop', 1)
self.multiworld.get_region('Menu', 1).exits = []
self.multiworld.swamp_patch_required[1] = True
self.multiworld.worlds[1].set_rules()
self.multiworld.worlds[1].create_items()
self.world.set_rules()
self.world.create_items()
self.multiworld.itempool.extend(get_dungeon_item_pool(self.multiworld))
self.multiworld.itempool.extend(ItemFactory(['Green Pendant', 'Red Pendant', 'Blue Pendant', 'Beat Agahnim 1', 'Beat Agahnim 2', 'Crystal 1', 'Crystal 2', 'Crystal 3', 'Crystal 4', 'Crystal 5', 'Crystal 6', 'Crystal 7'], 1))
self.multiworld.itempool.extend(item_factory(['Green Pendant', 'Red Pendant', 'Blue Pendant', 'Beat Agahnim 1', 'Beat Agahnim 2', 'Crystal 1', 'Crystal 2', 'Crystal 3', 'Crystal 4', 'Crystal 5', 'Crystal 6', 'Crystal 7'], self.world))
def run_tests(self, access_pool):
for exit in self.remove_exits:
@@ -40,9 +40,9 @@ class TestDungeon(LTTPTestBase):
if all_except and len(all_except) > 0:
items = self.multiworld.itempool[:]
items = [item for item in items if item.name not in all_except and not ("Bottle" in item.name and "AnyBottle" in all_except)]
items.extend(ItemFactory(item_pool[0], 1))
items.extend(item_factory(item_pool[0], self.world))
else:
items = ItemFactory(items, 1)
items = item_factory(items, self.world)
state = CollectionState(self.multiworld)
state.reachable_regions[1].add(self.multiworld.get_region('Menu', 1))
for region_name in self.starting_regions: