mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
core: clarify usage of classmethods in World class (#1449)
This commit is contained in:
@@ -188,10 +188,11 @@ class World(metaclass=AutoWorldRegister):
|
||||
# can also be implemented as a classmethod and called "stage_<original_name>",
|
||||
# in that case the MultiWorld object is passed as an argument and it gets called once for the entire multiworld.
|
||||
# An example of this can be found in alttp as stage_pre_fill
|
||||
|
||||
@classmethod
|
||||
def assert_generate(cls) -> None:
|
||||
def stage_assert_generate(cls, multiworld: "MultiWorld") -> None:
|
||||
"""Checks that a game is capable of generating, usually checks for some base file like a ROM.
|
||||
Not run for unittests since they don't produce output"""
|
||||
This gets called once per present world type. Not run for unittests since they don't produce output"""
|
||||
pass
|
||||
|
||||
def generate_early(self) -> None:
|
||||
@@ -213,14 +214,12 @@ class World(metaclass=AutoWorldRegister):
|
||||
"""Optional method that is supposed to be used for special fill stages. This is run *after* plando."""
|
||||
pass
|
||||
|
||||
@classmethod
|
||||
def fill_hook(cls,
|
||||
def fill_hook(self,
|
||||
progitempool: List["Item"],
|
||||
usefulitempool: List["Item"],
|
||||
filleritempool: List["Item"],
|
||||
fill_locations: List["Location"]) -> None:
|
||||
"""Special method that gets called as part of distribute_items_restrictive (main fill).
|
||||
This gets called once per present world type."""
|
||||
"""Special method that gets called as part of distribute_items_restrictive (main fill)."""
|
||||
pass
|
||||
|
||||
def post_fill(self) -> None:
|
||||
|
||||
Reference in New Issue
Block a user