mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-21 03:03:46 -04:00
Fix all cases where a %S was before a space.
This commit is contained in:
parent
bf291fa062
commit
b8a306e62c
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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) {
|
||||
|
@ -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 ");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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) {
|
||||
|
@ -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));
|
||||
}
|
||||
|
||||
|
@ -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")
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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)) {
|
||||
|
@ -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());
|
||||
}
|
||||
|
@ -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 + ".");
|
||||
}
|
||||
|
@ -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 + ".";
|
||||
|
@ -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 <seconds>%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 <seconds>%S calls were " +
|
||||
Player.Message(p, "No %T/undo %Sor %T/undo [seconds] %Scalls were " +
|
||||
"found in the last 200 draw operations.");
|
||||
}
|
||||
|
||||
|
@ -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 <seconds>.");
|
||||
"past 50 draw operations are %T/undo %Sor %T/undo [seconds].");
|
||||
Player.Message(p, "Try using %T/undo <seconds> %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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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() {
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user