From a0c714b47f2299e63e4049e40943d628733aec9a Mon Sep 17 00:00:00 2001 From: ELAOA Date: Sun, 3 Apr 2022 00:41:18 +0430 Subject: [PATCH] Show idle people in players list --- Werewolf for Telegram/Werewolf Node/Werewolf.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Werewolf for Telegram/Werewolf Node/Werewolf.cs b/Werewolf for Telegram/Werewolf Node/Werewolf.cs index 39f73e37..11c384f1 100644 --- a/Werewolf for Telegram/Werewolf Node/Werewolf.cs +++ b/Werewolf for Telegram/Werewolf Node/Werewolf.cs @@ -1380,7 +1380,7 @@ private void SendPlayerList(bool joining = false) .Aggregate("", (current, p) => current + - p.GetName(dead: true) + ": " + (p.Fled ? GetLocaleString("RanAway") : GetLocaleString("Dead")) + (DbGroup.HasFlag(GroupConfig.ShowRolesDeath) ? " - " + GetDescription(p.PlayerRole) + (p.InLove ? loveEmoji : "") : "") + "\n"); + p.GetName(dead: true) + ": " + (p.DiedByFleeOrIdle ? (p.Fled ? GetLocaleString("RanAway") : GetLocaleString("Idle")) : GetLocaleString("Dead")) + (DbGroup.HasFlag(GroupConfig.ShowRolesDeath) ? " - " + GetDescription(p.PlayerRole) + (p.InLove ? loveEmoji : "") : "") + "\n"); msg += players.Where(x => !x.IsDead).OrderBy(x => Program.R.Next()) .Aggregate("", @@ -1396,7 +1396,7 @@ private void SendPlayerList(bool joining = false) .Aggregate("", (current, p) => current + - ($"{p.GetName(dead: p.IsDead)}: {(p.IsDead ? ((p.Fled ? GetLocaleString("RanAway") : GetLocaleString("Dead")) + (DbGroup.HasFlag(GroupConfig.ShowRolesDeath) ? " - " + GetDescription(p.PlayerRole) + (p.InLove ? "❤️" : "") : "")) : GetLocaleString("Alive"))}\n")); + ($"{p.GetName(dead: p.IsDead)}: {(p.IsDead ? ((p.DiedByFleeOrIdle ? (p.Fled ? GetLocaleString("RanAway") : GetLocaleString("Idle")) : GetLocaleString("Dead")) + (DbGroup.HasFlag(GroupConfig.ShowRolesDeath) ? " - " + GetDescription(p.PlayerRole) + (p.InLove ? "❤️" : "") : "")) : GetLocaleString("Alive"))}\n")); //{(p.HasUsedAbility & !p.IsDead && new[] { IRole.Prince, IRole.Mayor, IRole.Gunner, IRole.Blacksmith }.Contains(p.PlayerRole) ? " - " + GetDescription(p.PlayerRole) : "")} //OLD CODE SHOWING KNOWN ROLES } } @@ -4845,7 +4845,7 @@ private bool DoGameEnd(ITeam team) msg = $"{GetLocaleString("PlayersAlive")}: {Players.Count(x => !x.IsDead)} / {Players.Count}\n" + Players.OrderBy(x => x.TimeDied).Aggregate(msg, (current, p) => current + $"\n{p.GetName()}"); break; case "All": - msg = $"{GetLocaleString("PlayersAlive")}: {Players.Count(x => !x.IsDead)} / {Players.Count}\n" + Players.OrderBy(x => x.TimeDied).Aggregate("", (current, p) => current + ($"{p.GetName()}: {(p.IsDead ? (p.Fled ? GetLocaleString("RanAway") : GetLocaleString("Dead")) : GetLocaleString("Alive")) + " - " + GetDescription(p.PlayerRole) + (p.InLove ? "❤️" : "")} {(p.Won ? GetLocaleString("Won") : GetLocaleString("Lost"))}\n")); + msg = $"{GetLocaleString("PlayersAlive")}: {Players.Count(x => !x.IsDead)} / {Players.Count}\n" + Players.OrderBy(x => x.TimeDied).Aggregate("", (current, p) => current + ($"{p.GetName()}: {(p.IsDead ? (p.DiedByFleeOrIdle ? (p.Fled ? GetLocaleString("RanAway") : GetLocaleString("Idle")) : GetLocaleString("Dead")) : GetLocaleString("Alive")) + " - " + GetDescription(p.PlayerRole) + (p.InLove ? "❤️" : "")} {(p.Won ? GetLocaleString("Won") : GetLocaleString("Lost"))}\n")); break; default: msg = GetLocaleString("RemainingPlayersEnd") + Environment.NewLine;