Include number of death_link connected clients in status.

This commit is contained in:
CaitSith2 2021-11-21 01:37:23 -08:00
parent c21bd11b66
commit 3d19c39001
1 changed files with 3 additions and 1 deletions

View File

@ -591,10 +591,12 @@ def get_status_string(ctx: Context, team: int):
text = "Player Status on your team:"
for slot in ctx.locations:
connected = len(ctx.clients[team][slot])
death_link = len([client for client in ctx.clients[team][slot] if "DeathLink" in client.tags])
completion_text = f"({len(ctx.location_checks[team, slot])}/{len(ctx.locations[slot])})"
death_text = f" {death_link} of which are death link" if connected else ""
goal_text = " and has finished." if ctx.client_game_state[team, slot] == ClientStatus.CLIENT_GOAL else "."
text += f"\n{ctx.get_aliased_name(team, slot)} has {connected} connection{'' if connected == 1 else 's'}" \
f"{goal_text} {completion_text}"
f"{death_text}{goal_text} {completion_text}"
return text