mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
RIP: MultiMystery and Mystery, now there's just Generate
Other changes: host.yaml Multi Mystery options were moved and changed generate_output now has an output_directory argument MultiWorld.get_game_players(<game>) now replaces <game>_player_ids Python venv should now work properly
This commit is contained in:
@@ -21,6 +21,7 @@ class AutoWorldRegister(type):
|
||||
AutoWorldRegister.world_types[dct["game"]] = new_class
|
||||
return new_class
|
||||
|
||||
|
||||
class AutoLogicRegister(type):
|
||||
def __new__(cls, name, bases, dct):
|
||||
new_class = super().__new__(cls, name, bases, dct)
|
||||
@@ -31,14 +32,15 @@ class AutoLogicRegister(type):
|
||||
setattr(CollectionState, item_name, function)
|
||||
return new_class
|
||||
|
||||
def call_single(world: MultiWorld, method_name: str, player: int):
|
||||
|
||||
def call_single(world: MultiWorld, method_name: str, player: int, *args):
|
||||
method = getattr(world.worlds[player], method_name)
|
||||
return method()
|
||||
return method(*args)
|
||||
|
||||
|
||||
def call_all(world: MultiWorld, method_name: str):
|
||||
def call_all(world: MultiWorld, method_name: str, *args):
|
||||
for player in world.player_ids:
|
||||
call_single(world, method_name, player)
|
||||
call_single(world, method_name, player, *args)
|
||||
|
||||
|
||||
class World(metaclass=AutoWorldRegister):
|
||||
@@ -93,11 +95,15 @@ class World(metaclass=AutoWorldRegister):
|
||||
def generate_basic(self):
|
||||
pass
|
||||
|
||||
def generate_output(self):
|
||||
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."""
|
||||
pass
|
||||
|
||||
def fill_slot_data(self):
|
||||
"""Fill in the slot_data field in the Connected network package."""
|
||||
return {}
|
||||
|
||||
def get_required_client_version(self) -> Tuple[int, int, int]:
|
||||
return 0, 0, 3
|
||||
|
||||
|
Reference in New Issue
Block a user