AutoWorld: add forced_auto_forfeit and set it for StS

This commit is contained in:
Fabian Dill 2021-08-31 16:04:37 +02:00
parent 321569c542
commit 01f1545b3e
3 changed files with 8 additions and 0 deletions

View File

@ -1193,6 +1193,8 @@ def update_client_status(ctx: Context, client: Client, new_status: ClientStatus)
ctx.notify_all(finished_msg)
if "auto" in ctx.forfeit_mode:
forfeit_player(ctx, client.team, client.slot)
elif proxy_worlds[ctx.games[client.slot]].forced_auto_forfeit:
forfeit_player(ctx, client.team, client.slot)
ctx.client_game_state[client.team, client.slot] = new_status

View File

@ -91,6 +91,10 @@ class World(metaclass=AutoWorldRegister):
# the client finds its own items in its own world.
remote_items: bool = True
# For games where after a victory it is impossible to go back in and get additional/remaining Locations checked.
# this forces forfeit: auto for those games.
forced_auto_forfeit: bool = False
# Hide World Type from various views. Does not remove functionality.
hidden = False

View File

@ -18,6 +18,8 @@ class SpireWorld(World):
item_name_to_id = {name: data.code for name, data in item_table.items()}
location_name_to_id = location_table
forced_auto_forfeit = True
def _get_slot_data(self):
return {
'seed': "".join(self.world.slot_seeds[self.player].choice(string.ascii_letters) for i in range(16)),