AutoWorld: add post_fill
LttP: Move ShopSlotFill to post_fill
This commit is contained in:
@@ -138,6 +138,9 @@ class World(metaclass=AutoWorldRegister):
|
||||
This gets called once per present world type."""
|
||||
pass
|
||||
|
||||
def post_fill(self):
|
||||
"""Optional Method that is called after regular fill. Can be used to do adjustments before output generation."""
|
||||
|
||||
def generate_output(self, output_directory: str):
|
||||
"""This method gets called from a threadpool, do not use world.random here.
|
||||
If you need any last-second randomization, use MultiWorld.slot_seeds[slot] instead."""
|
||||
|
||||
@@ -159,6 +159,7 @@ def ShopSlotFill(world):
|
||||
shop_slots -= removed
|
||||
|
||||
if shop_slots:
|
||||
logger.info("Filling LttP Shop Slots")
|
||||
del shop_slots
|
||||
|
||||
from Fill import swap_location_item
|
||||
|
||||
@@ -229,6 +229,10 @@ class ALTTPWorld(World):
|
||||
from .Dungeons import fill_dungeons_restrictive
|
||||
fill_dungeons_restrictive(world)
|
||||
|
||||
@classmethod
|
||||
def stage_post_fill(cls, world):
|
||||
Shops.ShopSlotFill(world)
|
||||
|
||||
def generate_output(self, output_directory: str):
|
||||
world = self.world
|
||||
player = self.player
|
||||
|
||||
Reference in New Issue
Block a user