Skip to content

Commit

Permalink
MultiServer: !status shows Ready status (#3598)
Browse files Browse the repository at this point in the history
* Makes !status show a note if the slot is in Status Ready

* update variable name for better clarity
  • Loading branch information
qwint authored Nov 30, 2024
1 parent 7adb673 commit 845a604
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions MultiServer.py
Original file line number Diff line number Diff line change
Expand Up @@ -975,9 +975,13 @@ def get_status_string(ctx: Context, team: int, tag: str):
tagged = len([client for client in ctx.clients[team][slot] if tag in client.tags])
completion_text = f"({len(ctx.location_checks[team, slot])}/{len(ctx.locations[slot])})"
tag_text = f" {tagged} of which are tagged {tag}" if connected and tag else ""
goal_text = " and has finished." if ctx.client_game_state[team, slot] == ClientStatus.CLIENT_GOAL else "."
status_text = (
" and has finished." if ctx.client_game_state[team, slot] == ClientStatus.CLIENT_GOAL else
" and is ready." if ctx.client_game_state[team, slot] == ClientStatus.CLIENT_READY else
"."
)
text += f"\n{ctx.get_aliased_name(team, slot)} has {connected} connection{'' if connected == 1 else 's'}" \
f"{tag_text}{goal_text} {completion_text}"
f"{tag_text}{status_text} {completion_text}"
return text


Expand Down

0 comments on commit 845a604

Please sign in to comment.