mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-23 04:32:50 -04:00
Make 'win chance' line in /mi fit on one line, make time for zs in /time use relative timespan.
This commit is contained in:
parent
9e9d369c71
commit
c2ce0083b2
@ -79,9 +79,10 @@ namespace MCGalaxy.Commands {
|
||||
if (!Server.zombie.IsZombieMap(data.Name)) return;
|
||||
Player.Message(p, "Map authors: " + data.Authors);
|
||||
int winChance = data.TotalRounds == 0 ? 100 : (data.HumanRounds * 100) / data.TotalRounds;
|
||||
Player.Message(p, "&a" + data.TotalRounds + " %Srounds played total, with a &a"
|
||||
+ winChance + "% %Swin chance for humans.");
|
||||
Player.Message(p, "This map has &a" + data.Likes + " likes %Sand &c" + data.Dislikes + " dislikes");
|
||||
Player.Message(p, "&a{0} %Srounds played total, &a{1}% %Swin chance for humans.",
|
||||
data.TotalRounds, winChance);
|
||||
Player.Message(p, "This map has &a{0} likes %Sand &c{1} dislikes",
|
||||
data.Likes, data.Dislikes);
|
||||
}
|
||||
|
||||
void ShowPermissions(Player p, MapInfoData data) {
|
||||
|
@ -32,13 +32,13 @@ namespace MCGalaxy.Commands {
|
||||
Player.Message(p, "Server time: {0:HH:mm:ss} on {0:d}", DateTime.Now);
|
||||
if (!Server.zombie.Running) return;
|
||||
|
||||
int delta = (int)(Server.zombie.RoundEnd - DateTime.UtcNow).TotalSeconds;
|
||||
if (delta > 0) {
|
||||
Player.Message(p, "&a" + delta + " %Sseconds until the round ends.");
|
||||
TimeSpan delta = Server.zombie.RoundEnd - DateTime.UtcNow;
|
||||
if (delta.TotalSeconds > 0) {
|
||||
Player.Message(p, "&a{0} %Suntil the round ends.", delta.Shorten(true));
|
||||
} else {
|
||||
delta = (int)(Server.zombie.RoundStart - DateTime.UtcNow).TotalSeconds;
|
||||
if (delta > 0)
|
||||
Player.Message(p, "&a" + delta + " %Sseconds until the round starts.");
|
||||
delta = Server.zombie.RoundStart - DateTime.UtcNow;
|
||||
if (delta.TotalSeconds > 0)
|
||||
Player.Message(p, "&a{0} %Suntil the round starts.", delta.Shorten(true));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user