mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Core: optimize away Item.world (#840)
* Core: optimize away Item.world * Update test/general/TestFill.py * Test: undo unnecessary changes * lttp: remove two more Item.world writes Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
This commit is contained in:
@@ -15,7 +15,6 @@ def create_dungeons(world, player):
|
||||
dungeon_items, player)
|
||||
for item in dungeon.all_items:
|
||||
item.dungeon = dungeon
|
||||
item.world = world
|
||||
dungeon.boss = BossFactory(default_boss, player) if default_boss else None
|
||||
for region in dungeon.regions:
|
||||
world.get_region(region, player).dungeon = dungeon
|
||||
|
||||
@@ -935,7 +935,6 @@ def set_trock_key_rules(world, player):
|
||||
else:
|
||||
# A key is required in the Big Key Chest to prevent a possible softlock. Place an extra key to ensure 100% locations still works
|
||||
item = ItemFactory('Small Key (Turtle Rock)', player)
|
||||
item.world = world
|
||||
location = world.get_location('Turtle Rock - Big Key Chest', player)
|
||||
location.place_locked_item(item)
|
||||
location.event = True
|
||||
|
||||
@@ -335,7 +335,6 @@ def create_shops(world, player: int):
|
||||
else:
|
||||
loc.item = ItemFactory(GetBeemizerItem(world, player, 'Nothing'), player)
|
||||
loc.shop_slot_disabled = True
|
||||
loc.item.world = world
|
||||
shop.region.locations.append(loc)
|
||||
world.clear_location_cache()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user