From 77636bcc85d35821b3aa2f12964d768dda6881c4 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Fri, 7 Jul 2017 21:32:11 +1000 Subject: [PATCH] Combine /endround into /zs end --- .../Fun/ZombieSurvival/CmdEndRound.cs | 40 ------------------- .../Fun/ZombieSurvival/CmdZombieGame.cs | 12 +++++- MCGalaxy/MCGalaxy_.csproj | 1 - 3 files changed, 11 insertions(+), 42 deletions(-) delete mode 100644 MCGalaxy/Commands/Fun/ZombieSurvival/CmdEndRound.cs diff --git a/MCGalaxy/Commands/Fun/ZombieSurvival/CmdEndRound.cs b/MCGalaxy/Commands/Fun/ZombieSurvival/CmdEndRound.cs deleted file mode 100644 index b5f9271ff..000000000 --- a/MCGalaxy/Commands/Fun/ZombieSurvival/CmdEndRound.cs +++ /dev/null @@ -1,40 +0,0 @@ -/* - Copyright 2011 MCForge - - Dual-licensed under the Educational Community License, Version 2.0 and - the GNU General Public License, Version 3 (the "Licenses"); you may - not use this file except in compliance with the Licenses. You may - obtain a copy of the Licenses at - - http://www.opensource.org/licenses/ecl2.php - http://www.gnu.org/licenses/gpl-3.0.html - - Unless required by applicable law or agreed to in writing, - software distributed under the Licenses are distributed on an "AS IS" - BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - or implied. See the Licenses for the specific language governing - permissions and limitations under the Licenses. -*/ -namespace MCGalaxy.Commands.Fun { - public sealed class CmdEndRound : Command { - public override string name { get { return "endround"; } } - public override string shortcut { get { return "er"; } } - public override string type { get { return CommandTypes.Moderation; } } - public override bool museumUsable { get { return true; } } - public override LevelPermission defaultRank { get { return LevelPermission.Operator; } } - public override CommandEnable Enabled { get { return CommandEnable.Zombie; } } - - public override void Use(Player p, string message) { - if (Server.zombie.RoundInProgress) { - Server.zombie.EndRound(); - } else { - Player.Message(p, "No round is currently in progress."); - } - } - - public override void Help(Player p) { - Player.Message(p, "%T/endround"); - Player.Message(p, "%HEnds the current round of zombie survival"); - } - } -} diff --git a/MCGalaxy/Commands/Fun/ZombieSurvival/CmdZombieGame.cs b/MCGalaxy/Commands/Fun/ZombieSurvival/CmdZombieGame.cs index f76d21bbe..f78264750 100644 --- a/MCGalaxy/Commands/Fun/ZombieSurvival/CmdZombieGame.cs +++ b/MCGalaxy/Commands/Fun/ZombieSurvival/CmdZombieGame.cs @@ -37,6 +37,7 @@ namespace MCGalaxy.Commands.Fun { case "go": HandleGo(p, args); break; case "status": HandleStatus(p, args); break; case "start": HandleStart(p, args); break; + case "end": HandleEnd(p, args); break; case "stop": HandleStop(p, args); break; case "set": HandleSet(p, args); break; default: Help(p); break; @@ -86,6 +87,14 @@ namespace MCGalaxy.Commands.Fun { } } + static void HandleEnd(Player p, string[] args) { + if (Server.zombie.RoundInProgress) { + Server.zombie.EndRound(); + } else { + Player.Message(p, "No round is currently in progress."); + } + } + static void HandleStop(Player p, string[] args) { if (!Server.zombie.Running) { Player.Message(p, "There is no Zombie Survival game currently in progress."); return; @@ -141,8 +150,9 @@ namespace MCGalaxy.Commands.Fun { public override void Help(Player p) { Player.Message(p, "%T/zg status %H- Outputs current status of Zombie Survival."); Player.Message(p, "%T/zg go %H- Moves you to the current Zombie Survival map."); - Player.Message(p, "%T/zg start 0 %H- Runs Zombie Survival for infinite rounds."); + Player.Message(p, "%T/zg start 0 %H- Runs Zombie Survival for infinite rounds."); Player.Message(p, "%T/zg start [x] %H- Runs Zombie Survival for [x] rounds."); + Player.Message(p, "%T/zg end %H- Ends current round of Zombie Survival."); Player.Message(p, "%T/zg stop %H- Immediately stops Zombie Survival."); Player.Message(p, "%T/zg set [property] [value]"); Player.Message(p, "%HSets a Zombie Survival game property, see %T/help zs set"); diff --git a/MCGalaxy/MCGalaxy_.csproj b/MCGalaxy/MCGalaxy_.csproj index 3e41c4069..43481fff2 100644 --- a/MCGalaxy/MCGalaxy_.csproj +++ b/MCGalaxy/MCGalaxy_.csproj @@ -237,7 +237,6 @@ -