From b8a306e62caf5e02cfeda155f832e2134adfaf21 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Mon, 5 Sep 2016 22:44:28 +1000 Subject: [PATCH] Fix all cases where a %S was before a space. --- Commands/Chat/CmdNick.cs | 4 ++-- Commands/Fun/Cmd8Ball.cs | 2 +- Commands/Information/CmdAbout.cs | 2 +- Commands/Information/CmdCommands.cs | 4 ++-- Commands/Information/CmdMeasure.cs | 2 +- Commands/Information/CmdServerInfo.cs | 6 +++--- Commands/Information/CmdWhere.cs | 4 ++-- Commands/Information/WhoInfo.cs | 4 ++-- Commands/Moderation/CmdKick.cs | 4 ++-- Commands/Moderation/CmdLowlag.cs | 4 ++-- Commands/Moderation/CmdTempRank.cs | 6 +++--- Commands/World/CmdCopyLVL.cs | 2 +- Commands/World/CmdPhysics.cs | 2 +- Commands/building/CmdRedo.cs | 4 ++-- Commands/building/CmdUndo.cs | 4 ++-- Games/ZombieSurvival/ZombieGame.Core.cs | 2 +- Levels/LevelAccess.cs | 4 ++-- Levels/LevelEnv.cs | 18 +++++++++--------- 18 files changed, 39 insertions(+), 39 deletions(-) diff --git a/Commands/Chat/CmdNick.cs b/Commands/Chat/CmdNick.cs index 36a251aa6..47a875588 100644 --- a/Commands/Chat/CmdNick.cs +++ b/Commands/Chat/CmdNick.cs @@ -77,10 +77,10 @@ namespace MCGalaxy.Commands { string newName = args.Length > 1 ? args[1] : ""; if (newName == "") { who.DisplayName = who.truename; - Player.SendChatFrom(who, who.FullName + "%S reverted their nick to their original name.", false); + Player.SendChatFrom(who, who.FullName + " %Sreverted their nick to their original name.", false); } else { if (newName.Length >= 30) { Player.Message(p, "Nick must be under 30 letters."); return; } - Player.SendChatFrom(who, who.FullName + "%S changed their nick to " + who.color + newName + "%S.", false); + Player.SendChatFrom(who, who.FullName + " %Schanged their nick to " + who.color + newName + "%S.", false); who.DisplayName = newName; } diff --git a/Commands/Fun/Cmd8Ball.cs b/Commands/Fun/Cmd8Ball.cs index d50c1871f..fdd4b2a58 100644 --- a/Commands/Fun/Cmd8Ball.cs +++ b/Commands/Fun/Cmd8Ball.cs @@ -50,7 +50,7 @@ namespace MCGalaxy.Commands { } string final = builder.ToString(); - Chat.MessageAll("{0}%S asked the &b8-Ball: &f{1}", p.ColoredName, message); + Chat.MessageAll("{0} %Sasked the &b8-Ball: &f{1}", p.ColoredName, message); Server.MainScheduler.QueueOnce(EightBallCallback, final, delay); } diff --git a/Commands/Information/CmdAbout.cs b/Commands/Information/CmdAbout.cs index b4d2a1dd0..135032835 100644 --- a/Commands/Information/CmdAbout.cs +++ b/Commands/Information/CmdAbout.cs @@ -86,7 +86,7 @@ namespace MCGalaxy.Commands { string bName = Block.Name(block); Player.Message(p, "{0} ago {1} {2}", delta.Shorten(true, false), PlayerInfo.GetColoredName(p, user), - deleted ? "&4deleted%S (using " + bName + ")" : "&3placed%S " + bName); + deleted ? "&4deleted %S(using " + bName + ")" : "&3placed %S" + bName); } static void OutputMessageBlock(Player p, byte block, ushort x, ushort y, ushort z) { diff --git a/Commands/Information/CmdCommands.cs b/Commands/Information/CmdCommands.cs index be2010495..57546b391 100644 --- a/Commands/Information/CmdCommands.cs +++ b/Commands/Information/CmdCommands.cs @@ -99,11 +99,11 @@ namespace MCGalaxy.Commands { if (list1) { Player.Message(p, "Available shortcuts (1):"); Player.Message(p, cmds.ToString(2, cmds.Length - 2)); - Player.Message(p, "Type %T/cmds shortcuts 2%S to view the rest of the list "); + Player.Message(p, "Type %T/cmds shortcuts 2 %Sto view the rest of the list "); } else { Player.Message(p, "Available shortcuts (2):"); Player.Message(p, cmds.ToString(2, cmds.Length - 2)); - Player.Message(p, "Type %T/cmds shortcuts 1%S to view the rest of the list "); + Player.Message(p, "Type %T/cmds shortcuts 1 %Sto view the rest of the list "); } } diff --git a/Commands/Information/CmdMeasure.cs b/Commands/Information/CmdMeasure.cs index 8acf63033..c3596feb9 100644 --- a/Commands/Information/CmdMeasure.cs +++ b/Commands/Information/CmdMeasure.cs @@ -57,7 +57,7 @@ namespace MCGalaxy.Commands { } int width = maxX - minX + 1, height = maxY - minY + 1, length = maxZ - minZ + 1; - Player.Message(p, "Measuring from &a({0}, {1}, {2})%S to &a({3}, {4}, {5})", + Player.Message(p, "Measuring from &a({0}, {1}, {2}) %Sto &a({3}, {4}, {5})", minX, minY, minZ, maxX, maxY, maxZ); Player.Message(p, "Area is {0} wide, {1} high, {2} long. Volume is {3} blocks.", width, height, length, width * height * length); diff --git a/Commands/Information/CmdServerInfo.cs b/Commands/Information/CmdServerInfo.cs index 39e62df8f..0168ca363 100644 --- a/Commands/Information/CmdServerInfo.cs +++ b/Commands/Information/CmdServerInfo.cs @@ -39,7 +39,7 @@ namespace MCGalaxy.Commands { if (message != "") { Help(p); return; } Player.Message(p, "Server's name: &b{0}%S", Server.name); - Player.Message(p, "&a{0}%S players total. (&a{1}%S online, &8{2} banned%S)", + Player.Message(p, "&a{0} %Splayers total. (&a{1} %Sonline, &8{2} banned%S)", GetPlayerCount(), Player.number, Player.GetBannedCount()); Player.Message(p, "&a{0} %Slevels currently loaded. Currency is &3{1}%S.", LevelInfo.Loaded.Count, Server.moneys); @@ -47,7 +47,7 @@ namespace MCGalaxy.Commands { TimeSpan up = DateTime.UtcNow - Server.StartTime; Player.Message(p, "Been up for &b" + up.Shorten(true) + "%S, running &bMCGalaxy &a" + Server.VersionString + - "%S (based on &bMCForge %Sand &bMCLawl%S)."); + " %S(based on &bMCForge %Sand &bMCLawl%S)."); Player.Message(p, "Player positions are updated every &b" + Server.updateTimer.Interval + " %Smilliseconds."); @@ -98,7 +98,7 @@ namespace MCGalaxy.Commands { int mem = (int)Math.Round(proc.PrivateMemorySize64 / 1048576.0); double cpu = Server.ProcessCounter.NextValue(), all = Server.PCCounter.NextValue(); Player.Message(p, "&a{0}% %SCPU usage, &a{1}% %Sby all processes", cpu.ToString("F2"), all.ToString("F2")); - Player.Message(p, "&a{0}%S threads, using &a{1}%S megabytes of memory", threads, mem); + Player.Message(p, "&a{0} %Sthreads, using &a{1} %Smegabytes of memory", threads, mem); } public override void Help(Player p) { diff --git a/Commands/Information/CmdWhere.cs b/Commands/Information/CmdWhere.cs index d776bd812..6a514f702 100644 --- a/Commands/Information/CmdWhere.cs +++ b/Commands/Information/CmdWhere.cs @@ -36,9 +36,9 @@ namespace MCGalaxy.Commands { } short x = (short)pl.pos[0], y = (short)pl.pos[1], z = (short)pl.pos[2]; - Player.Message(p, "{0}%S is on {1} (X:&b{2}%S Y:&b{3}%S Z:&b{4}%S)", + Player.Message(p, "{0} %Sis on {1} (X:&b{2} %SY:&b{3} %SZ:&b{4}%S)", pl.ColoredName, pl.level.name, x >> 5, (y - 51) >> 5, z >> 5); - Player.Message(p, "Yaw: &b{0}%S degrees, Pitch: &b{1}%S degrees", + Player.Message(p, "Yaw: &b{0} %Sdegrees, Pitch: &b{1} %Sdegrees", (int)(p.rot[0] * 360 / 256), (int)(p.rot[1] * 360 / 256)); } diff --git a/Commands/Information/WhoInfo.cs b/Commands/Information/WhoInfo.cs index 73560d307..962f3c389 100644 --- a/Commands/Information/WhoInfo.cs +++ b/Commands/Information/WhoInfo.cs @@ -52,10 +52,10 @@ namespace MCGalaxy.Commands { who.TotalPlaced, who.TotalDeleted, who.TotalDrawn); if (who.TimeOnline.Ticks > 0) - Player.Message(p, " Spent &a{0}%S on the server, &a{1}%S this session", + Player.Message(p, " Spent &a{0} %Son the server, &a{1} %Sthis session", who.TimeSpent.Shorten(), who.TimeOnline.Shorten()); else - Player.Message(p, " Spent &a{0}%S on the server", who.TimeSpent.Shorten()); + Player.Message(p, " Spent &a{0} %Son the server", who.TimeSpent.Shorten()); if (who.Last.Ticks > 0) Player.Message(p, " First login &a" + who.First.ToString("yyyy-MM-dd") diff --git a/Commands/Moderation/CmdKick.cs b/Commands/Moderation/CmdKick.cs index b5b6e5e49..e6d15924c 100644 --- a/Commands/Moderation/CmdKick.cs +++ b/Commands/Moderation/CmdKick.cs @@ -38,8 +38,8 @@ namespace MCGalaxy.Commands.Moderation { if (p != null && p == who) { Player.Message(p, "You cannot kick yourself."); return; } if (p != null && who.Rank >= p.Rank) { - Player.SendChatFrom(p, p.ColoredName + "%S tried to kick " - + who.ColoredName + "%S but failed.", false); + Player.SendChatFrom(p, p.ColoredName + " %Stried to kick " + + who.ColoredName + " %Sbut failed.", false); return; } diff --git a/Commands/Moderation/CmdLowlag.cs b/Commands/Moderation/CmdLowlag.cs index 86da70712..7eaf9ecb7 100644 --- a/Commands/Moderation/CmdLowlag.cs +++ b/Commands/Moderation/CmdLowlag.cs @@ -29,10 +29,10 @@ namespace MCGalaxy.Commands public override void Use(Player p, string message) { if (message == "" && Server.updateTimer.Interval > 1000) { Server.PositionInterval = 100; - Chat.MessageAll("&dLow lag %Sturned &cOFF %S- positions update every &b100%S ms."); + Chat.MessageAll("&dLow lag %Sturned &cOFF %S- positions update every &b100 %Sms."); } else if (message == "") { Server.PositionInterval = 2000; - Chat.MessageAll("&dLow lag %Sturned &aON %S- positions update every &b2000%S ms."); + Chat.MessageAll("&dLow lag %Sturned &aON %S- positions update every &b2000 %Sms."); } else { int interval; if (!int.TryParse(message, out interval)) { diff --git a/Commands/Moderation/CmdTempRank.cs b/Commands/Moderation/CmdTempRank.cs index ae9a83047..61e2fa9e2 100644 --- a/Commands/Moderation/CmdTempRank.cs +++ b/Commands/Moderation/CmdTempRank.cs @@ -86,9 +86,9 @@ namespace MCGalaxy.Commands.Moderation { Server.TempRanks.Append(data); Command.all.Find("setrank").Use(null, target + " " + group.name + " assigning temp rank"); - Player.Message(p, "Temp ranked {0} to {1}%S for {2}", target, group.ColoredName, delta.Shorten()); + Player.Message(p, "Temp ranked {0} to {1} %Sfor {2}", target, group.ColoredName, delta.Shorten()); if (who != null) - Player.Message(who, "You have been temp ranked to {0}%S for {1}", group.ColoredName, delta.Shorten()); + Player.Message(who, "You have been temp ranked to {0} %Sfor {1}", group.ColoredName, delta.Shorten()); } static void Delete(Player p, string name) { @@ -153,7 +153,7 @@ namespace MCGalaxy.Commands.Moderation { TimeSpan expireDelta = expiry - DateTime.Now; Player.Message(p, "Temp rank information for {0}:", args[0]); - Player.Message(p, " From {0} %Sto {1}%S, by {2} &a{3}%S ago, expires in &a{4}", + Player.Message(p, " From {0} %Sto {1}%S, by {2} &a{3} %Sago, expires in &a{4}", oldCol + oldrank, tempCol + temprank, tempranker, delta.Shorten(), expireDelta.Shorten()); } diff --git a/Commands/World/CmdCopyLVL.cs b/Commands/World/CmdCopyLVL.cs index 997f7fab8..7f174572b 100644 --- a/Commands/World/CmdCopyLVL.cs +++ b/Commands/World/CmdCopyLVL.cs @@ -47,7 +47,7 @@ namespace MCGalaxy.Commands.World { try { LevelActions.CopyLevel(src, dst); } catch (System.IO.IOException) { - Player.Message(p, "The level &c" + dst + " %S already exists!"); return; + Player.Message(p, "The level &c" + dst + " %Salready exists!"); return; } Player.Message(p, "The level &a" + src + " %Shas been copied to &a" + dst + "."); } diff --git a/Commands/World/CmdPhysics.cs b/Commands/World/CmdPhysics.cs index ee9f749cb..89e5d13f9 100644 --- a/Commands/World/CmdPhysics.cs +++ b/Commands/World/CmdPhysics.cs @@ -71,7 +71,7 @@ namespace MCGalaxy.Commands { lvl.setPhysics(state); if (state == 0) lvl.ClearPhysics(); string stateDesc = states[state]; - lvl.ChatLevel("Physics are now " + stateDesc + "%S on &b" + lvl.name + "%S."); + lvl.ChatLevel("Physics are now " + stateDesc + " %Son &b" + lvl.name + "%S."); stateDesc = stateDesc.Substring( 2 ); string logInfo = "Physics are now " + stateDesc + " on " + lvl.name + "."; diff --git a/Commands/building/CmdRedo.cs b/Commands/building/CmdRedo.cs index a609f9808..5373ccb81 100644 --- a/Commands/building/CmdRedo.cs +++ b/Commands/building/CmdRedo.cs @@ -36,7 +36,7 @@ namespace MCGalaxy.Commands.Building { static void PerformRedo(Player p) { UndoDrawOpEntry[] entries = p.DrawOps.Items; if (entries.Length == 0) { - Player.Message(p, "You have no %T/undo%S or %T/undo %S to redo."); return; + Player.Message(p, "You have no %T/undo %Sor %T/undo [seconds] %Sto redo."); return; } for (int i = entries.Length - 1; i >= 0; i--) { @@ -50,7 +50,7 @@ namespace MCGalaxy.Commands.Building { Player.Message(p, "Redo performed."); return; } - Player.Message(p, "No %T/undo%S or %T/undo %S calls were " + + Player.Message(p, "No %T/undo %Sor %T/undo [seconds] %Scalls were " + "found in the last 200 draw operations."); } diff --git a/Commands/building/CmdUndo.cs b/Commands/building/CmdUndo.cs index 58acf17a0..778657ecb 100644 --- a/Commands/building/CmdUndo.cs +++ b/Commands/building/CmdUndo.cs @@ -88,7 +88,7 @@ namespace MCGalaxy.Commands.Building { } Player.Message(p, "Unable to undo any draw operations, as all of the " + - "past 50 draw operations are %T/undo%S or %T/undo ."); + "past 50 draw operations are %T/undo %Sor %T/undo [seconds]."); Player.Message(p, "Try using %T/undo %Sinstead."); } @@ -157,7 +157,7 @@ namespace MCGalaxy.Commands.Building { DrawOp.DoDrawOp(op, null, p, marks); if (op.found) { - Chat.MessageAll("{0}%S's actions for the past &b{1} %S were undone.", + Chat.MessageAll("{0}%S's actions for the past &b{1} %Swere undone.", PlayerInfo.GetColoredName(p, whoName), delta.Shorten(true)); Server.s.Log(whoName + "'s actions for the past " + delta.Shorten(true) + " were undone."); if (p != null) p.level.Save(true); diff --git a/Games/ZombieSurvival/ZombieGame.Core.cs b/Games/ZombieSurvival/ZombieGame.Core.cs index e6911d884..160ab0374 100644 --- a/Games/ZombieSurvival/ZombieGame.Core.cs +++ b/Games/ZombieSurvival/ZombieGame.Core.cs @@ -319,7 +319,7 @@ namespace MCGalaxy.Games { foreach (Player pl in alive) { if (pl.Game.PledgeSurvive) { pl.SendMessage("You received &a5 %3" + Server.moneys + - "%S for successfully pledging that you would survive."); + " %Sfor successfully pledging that you would survive."); pl.SetMoney(pl.money + 5); } diff --git a/Levels/LevelAccess.cs b/Levels/LevelAccess.cs index f39548cdd..9408c0ec8 100644 --- a/Levels/LevelAccess.cs +++ b/Levels/LevelAccess.cs @@ -95,7 +95,7 @@ namespace MCGalaxy { if (p.Rank > Max && !p.group.CanExecute(maxCmd)) { Group grp = Group.findPerm(Max); string grpName = grp == null ? "&f" + Max : grp.ColoredName; - Player.Message(p, "Only {2}%S and below may {1} {0}.", name, action, grpName); return false; + Player.Message(p, "Only {2} %Sand below may {1} {0}.", name, action, grpName); return false; } return true; } @@ -145,7 +145,7 @@ namespace MCGalaxy { Server.s.Log(lvl.name + " " + target + " permission changed to " + grp.Permission + "."); Chat.MessageLevel(lvl, target + " permission changed to " + grp.ColoredName + "%S."); if (p == null || p.level != lvl) - Player.Message(p, "{0} permission changed to {1}%S on {2}.", target, grp.ColoredName, lvl.name); + Player.Message(p, "{0} permission changed to {1} %Son {2}.", target, grp.ColoredName, lvl.name); } internal void UpdateAllowBuild() { diff --git a/Levels/LevelEnv.cs b/Levels/LevelEnv.cs index 723c8766a..c972c1cf2 100644 --- a/Levels/LevelEnv.cs +++ b/Levels/LevelEnv.cs @@ -24,7 +24,7 @@ namespace MCGalaxy { public static void SetWeather(Player p, Level lvl, string value) { byte weather = 255; if (IsResetString(value)) { - Player.Message(p, "Reset weather for {0}%S to 0 (%SSun)", lvl.name); + Player.Message(p, "Reset weather for {0} %Sto 0 (%SSun)", lvl.name); weather = 0; } else { if (byte.TryParse(value, out weather)) { @@ -51,7 +51,7 @@ namespace MCGalaxy { public static void SetBlock(Player p, string value, EnvProp prop, string variable, byte defValue, ref int target) { if (IsResetString(value)) { - Player.Message(p, "Reset {0} for {1}%S to normal", variable, p.level.name); + Player.Message(p, "Reset {0} for {1} %Sto normal", variable, p.level.name); target = defValue; } else { if (!CheckBlock(p, value, variable, ref target)) return; @@ -62,7 +62,7 @@ namespace MCGalaxy { public static void SetShort(Player p, string value, EnvProp prop, string variable, short defValue, ref int target) { if (IsResetString(value)) { - Player.Message(p, "Reset {0} for {1}%S to normal", variable, p.level.name); + Player.Message(p, "Reset {0} for {1} %Sto normal", variable, p.level.name); target = defValue; } else { if (!CheckShort(p, value, variable, ref target)) return; @@ -73,7 +73,7 @@ namespace MCGalaxy { public static void SetFloat(Player p, string value, EnvProp prop, int scale, string variable, short defValue, ref int target, int min, int max) { if (IsResetString(value)) { - Player.Message(p, "Reset {0} for {0}%S to normal", variable, p.level.name); + Player.Message(p, "Reset {0} for {0} %Sto normal", variable, p.level.name); target = defValue; } else { if (!CheckFloat(p, value, variable, ref target, scale, min, max)) return; @@ -83,11 +83,11 @@ namespace MCGalaxy { public static void SetColor(Player p, string value, byte envType, string envTypeName, ref string target) { if (IsResetString(value)) { - Player.Message(p, "Reset {0} color for {1}%S to normal", envTypeName, p.level.name); + Player.Message(p, "Reset {0} color for {1} %Sto normal", envTypeName, p.level.name); target = ""; } else { if (!Utils.CheckHex(p, ref value)) return; - Player.Message(p, "Set {0} color for {1}%S to #{2}", envTypeName, p.level.name, value); + Player.Message(p, "Set {0} color for {1} %Sto #{2}", envTypeName, p.level.name, value); target = value; } SendEnvColorPackets(p, envType, value); @@ -106,7 +106,7 @@ namespace MCGalaxy { Player.Message(p, "Env: Cannot use {0} for {1}.", block, variable); } else { modify = block == Block.custom_block ? extBlock : (byte)block; - Player.Message(p, "Set {0} for {1}%S to {2}", variable, p.level.name, modify); + Player.Message(p, "Set {0} for {1} %Sto {2}", variable, p.level.name, modify); return true; } return false; @@ -119,7 +119,7 @@ namespace MCGalaxy { return false; } else { modify = value; - Player.Message(p, "Set {0} for {1}%S to {2}", variable, p.level.name, value); + Player.Message(p, "Set {0} for {1} %Sto {2}", variable, p.level.name, value); return true; } } @@ -138,7 +138,7 @@ namespace MCGalaxy { return false; } else { modify = (int)(value * scale); - Player.Message(p, "Set {0} for {1}%S to {2}", variable, p.level.name, value.ToString("F2")); + Player.Message(p, "Set {0} for {1} %Sto {2}", variable, p.level.name, value.ToString("F2")); return true; } }