From 3d19c390017dce523d0e919b702c6b92c2f280c3 Mon Sep 17 00:00:00 2001 From: CaitSith2 Date: Sun, 21 Nov 2021 01:37:23 -0800 Subject: [PATCH] Include number of death_link connected clients in status. --- MultiServer.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/MultiServer.py b/MultiServer.py index 1874ae4c..05da2f65 100644 --- a/MultiServer.py +++ b/MultiServer.py @@ -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