mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
LttP: move game specific fill to new AutoWorld fill_hook
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
from __future__ import annotations
|
||||
from typing import Dict, Set, Tuple
|
||||
from typing import Dict, Set, Tuple, List
|
||||
|
||||
from BaseClasses import MultiWorld, Item, CollectionState
|
||||
from BaseClasses import MultiWorld, Item, CollectionState, Location
|
||||
|
||||
|
||||
class AutoWorldRegister(type):
|
||||
@@ -126,6 +126,12 @@ class World(metaclass=AutoWorldRegister):
|
||||
"""Optional method that is supposed to be used for special fill stages. This is run *after* plando."""
|
||||
pass
|
||||
|
||||
def fill_hook(cls, progitempool: List[Item], nonexcludeditempool: List[Item],
|
||||
localrestitempool: Dict[int, List[Item]], restitempool: List[Item], fill_locations: List[Location]):
|
||||
"""Special method that gets called as part of distribute_items_restrictive (main fill).
|
||||
This gets called once per present world type."""
|
||||
pass
|
||||
|
||||
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."""
|
||||
|
Reference in New Issue
Block a user