Fix warnings and code cleanup/fixes (#13570)
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using Content.Server.Actions;
|
||||
using Content.Server.Chat.Managers;
|
||||
@@ -77,9 +78,9 @@ public sealed class ZombieRuleSystem : GameRuleSystem
|
||||
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", Math.Round((percent * 100), 2).ToString())));
|
||||
ev.AddLine(Loc.GetString("zombie-round-end-amount-medium", ("percent", Math.Round((percent * 100), 2).ToString(CultureInfo.InvariantCulture))));
|
||||
else if (percent < 1)
|
||||
ev.AddLine(Loc.GetString("zombie-round-end-amount-high", ("percent", Math.Round((percent * 100), 2).ToString())));
|
||||
ev.AddLine(Loc.GetString("zombie-round-end-amount-high", ("percent", Math.Round((percent * 100), 2).ToString(CultureInfo.InvariantCulture))));
|
||||
else
|
||||
ev.AddLine(Loc.GetString("zombie-round-end-amount-all"));
|
||||
|
||||
@@ -174,7 +175,6 @@ public sealed class ZombieRuleSystem : GameRuleSystem
|
||||
{
|
||||
_chatManager.DispatchServerAnnouncement(Loc.GetString("zombie-no-one-ready"));
|
||||
ev.Cancel();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -216,7 +216,7 @@ public sealed class ZombieRuleSystem : GameRuleSystem
|
||||
livingHumans.Add(mob.Owner);
|
||||
}
|
||||
}
|
||||
return ((float) livingZombies.Count) / (float) totalPlayers.Count;
|
||||
return livingZombies.Count / (float) totalPlayers.Count;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user