AutoWorld: add forced_auto_forfeit and set it for StS
This commit is contained in:
parent
321569c542
commit
01f1545b3e
|
@ -1193,6 +1193,8 @@ def update_client_status(ctx: Context, client: Client, new_status: ClientStatus)
|
||||||
ctx.notify_all(finished_msg)
|
ctx.notify_all(finished_msg)
|
||||||
if "auto" in ctx.forfeit_mode:
|
if "auto" in ctx.forfeit_mode:
|
||||||
forfeit_player(ctx, client.team, client.slot)
|
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
|
ctx.client_game_state[client.team, client.slot] = new_status
|
||||||
|
|
||||||
|
|
|
@ -91,6 +91,10 @@ class World(metaclass=AutoWorldRegister):
|
||||||
# the client finds its own items in its own world.
|
# the client finds its own items in its own world.
|
||||||
remote_items: bool = True
|
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.
|
# Hide World Type from various views. Does not remove functionality.
|
||||||
hidden = False
|
hidden = False
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,8 @@ class SpireWorld(World):
|
||||||
item_name_to_id = {name: data.code for name, data in item_table.items()}
|
item_name_to_id = {name: data.code for name, data in item_table.items()}
|
||||||
location_name_to_id = location_table
|
location_name_to_id = location_table
|
||||||
|
|
||||||
|
forced_auto_forfeit = True
|
||||||
|
|
||||||
def _get_slot_data(self):
|
def _get_slot_data(self):
|
||||||
return {
|
return {
|
||||||
'seed': "".join(self.world.slot_seeds[self.player].choice(string.ascii_letters) for i in range(16)),
|
'seed': "".join(self.world.slot_seeds[self.player].choice(string.ascii_letters) for i in range(16)),
|
||||||
|
|
Loading…
Reference in New Issue