Skip to content

Commit

Permalink
MultiServer: add all worlds goal completion message (ArchipelagoMW#2956)
Browse files Browse the repository at this point in the history
  • Loading branch information
Silvris authored and EmilyV99 committed Apr 15, 2024
1 parent 970a5b2 commit 653e1ff
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions MultiServer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1837,6 +1837,11 @@ def update_client_status(ctx: Context, client: Client, new_status: ClientStatus)
if current != ClientStatus.CLIENT_GOAL: # can't undo goal completion
if new_status == ClientStatus.CLIENT_GOAL:
ctx.on_goal_achieved(client)
# if player has yet to ever connect to the server, they will not be in client_game_state
if all(player in ctx.client_game_state and ctx.client_game_state[player] == ClientStatus.CLIENT_GOAL
for player in ctx.player_names
if player[0] == client.team and player[1] != client.slot):
ctx.broadcast_text_all(f"Team #{client.team + 1} has completed all of their games! Congratulations!")

ctx.client_game_state[client.team, client.slot] = new_status
ctx.on_client_status_change(client.team, client.slot)
Expand Down

0 comments on commit 653e1ff

Please sign in to comment.