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:
Fabian Dill
2021-07-21 18:08:15 +02:00
parent 47f7ec16c0
commit 2fc4006dfa
21 changed files with 305 additions and 645 deletions

View File

@@ -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