Show map Zombie survival is running on in /zg status.

This commit is contained in:
UnknownShadow200 2016-07-29 08:59:22 +10:00
parent 2a4061b61c
commit d7b53bebea

View File

@ -19,17 +19,15 @@
using System; using System;
using MCGalaxy.Games; using MCGalaxy.Games;
namespace MCGalaxy.Commands namespace MCGalaxy.Commands {
{ public sealed class CmdZombieGame : Command {
public sealed class CmdZombieGame : Command
{
public override string name { get { return "zombiegame"; } } public override string name { get { return "zombiegame"; } }
public override string shortcut { get { return "zg"; } } public override string shortcut { get { return "zg"; } }
public override string type { get { return CommandTypes.Games; } } public override string type { get { return CommandTypes.Games; } }
public override bool museumUsable { get { return false; } } public override bool museumUsable { get { return false; } }
public override LevelPermission defaultRank { get { return LevelPermission.Operator; } } public override LevelPermission defaultRank { get { return LevelPermission.Operator; } }
public override CommandAlias[] Aliases { public override CommandAlias[] Aliases {
get { return new[] { new CommandAlias("zs"), new CommandAlias("zombiesurvival") }; } get { return new[] { new CommandAlias("zs"), new CommandAlias("zombiesurvival") }; }
} }
public CmdZombieGame() { } public CmdZombieGame() { }
@ -49,16 +47,19 @@ namespace MCGalaxy.Commands
static void HandleStatus(Player p, string message, string[] args) { static void HandleStatus(Player p, string message, string[] args) {
switch (Server.zombie.Status) { switch (Server.zombie.Status) {
case ZombieGameStatus.NotStarted: case ZombieGameStatus.NotStarted:
Player.Message(p, "Zombie Survival is not ccurrently running."); return; Player.Message(p, "Zombie Survival is not currently running."); break;
case ZombieGameStatus.InfiniteRounds: case ZombieGameStatus.InfiniteRounds:
Player.Message(p, "Zombie Survival is currently in progress with infinite rounds."); return; Player.Message(p, "Zombie Survival is currently in progress with infinite rounds."); break;
case ZombieGameStatus.SingleRound: case ZombieGameStatus.SingleRound:
Player.Message(p, "Zombie Survival game currently in progress."); return; Player.Message(p, "Zombie Survival game currently in progress."); break;
case ZombieGameStatus.VariableRounds: case ZombieGameStatus.VariableRounds:
Player.Message(p, "Zombie Survival game currently in progress with " + Server.zombie.MaxRounds + " rounds."); return; Player.Message(p, "Zombie Survival game currently in progress with " + Server.zombie.MaxRounds + " rounds."); break;
case ZombieGameStatus.LastRound: case ZombieGameStatus.LastRound:
Player.Message(p, "Zombie Survival game currently in progress, with this round being the final round."); return; Player.Message(p, "Zombie Survival game currently in progress, with this round being the final round."); break;
} }
if (Server.zombie.Status == ZombieGameStatus.NotStarted || Server.zombie.CurLevelName == "") return;
Player.Message(p, "Running on map: " + Server.zombie.CurLevelName);
} }
static void HandleStart(Player p, string message, string[] args) { static void HandleStart(Player p, string message, string[] args) {