Fix zombie percent in the round end summary (#9682)

This commit is contained in:
sBasalto
2022-07-14 14:11:44 +02:00
committed by GitHub
parent a8d4a688bd
commit 80a0c8e025

View File

@@ -69,16 +69,16 @@ public sealed class ZombieRuleSystem : GameRuleSystem
return;
//this is just the general condition thing used for determining the win/lose text
var percent = Math.Round(GetInfectedPercentage(out var livingHumans), 2);
var percent = GetInfectedPercentage(out var livingHumans);
if (percent <= 0)
ev.AddLine(Loc.GetString("zombie-round-end-amount-none"));
else if (percent <= 0.25)
ev.AddLine(Loc.GetString("zombie-round-end-amount-low"));
else if (percent <= 0.5)
ev.AddLine(Loc.GetString("zombie-round-end-amount-medium", ("percent", (percent * 100).ToString())));
ev.AddLine(Loc.GetString("zombie-round-end-amount-medium", ("percent", Math.Round((percent * 100), 2).ToString())));
else if (percent < 1)
ev.AddLine(Loc.GetString("zombie-round-end-amount-high", ("percent", (percent * 100).ToString())));
ev.AddLine(Loc.GetString("zombie-round-end-amount-high", ("percent", Math.Round((percent * 100), 2).ToString())));
else
ev.AddLine(Loc.GetString("zombie-round-end-amount-all"));