Small fixes and improvements

Re-added XTitle, fixed fakerank, added more environment presets and
other small fixes.
This commit is contained in:
Goodlyay 2015-10-28 19:17:53 -07:00
parent 4d5fac0169
commit c3eadb0ade
12 changed files with 100 additions and 110 deletions

View File

@ -52,7 +52,6 @@ namespace MCGalaxy.Commands
p.SendMessage("Valid targets: player, level [Abbreviated as p and l]"); p.SendMessage("Valid targets: player, level [Abbreviated as p and l]");
p.SendMessage("Valid variables: fog, cloud, sky, sun, shadow, level, horizon, border, weather, preset(l only)"); p.SendMessage("Valid variables: fog, cloud, sky, sun, shadow, level, horizon, border, weather, preset(l only)");
p.SendMessage("Using 'normal' as a value will reset the variable"); p.SendMessage("Using 'normal' as a value will reset the variable");
} }
public void Parse(Player p, string target, string[] pars) public void Parse(Player p, string target, string[] pars)
{ {
@ -609,12 +608,6 @@ namespace MCGalaxy.Commands
} }
break; break;
case "preset": case "preset":
if (valueText.Equals(""))
{
p.SendMessage("/env l preset [type] -- Uses an env preset on your map");
p.SendMessage("Valid types: Cartoon/Midnight/Noir/Normal/Trippy/Watery");
return;
}
if (valueText.Equals("midnight", StringComparison.OrdinalIgnoreCase)) if (valueText.Equals("midnight", StringComparison.OrdinalIgnoreCase))
{ {
Command.all.Find("env").Use(p, "l fog 8b8989"); Command.all.Find("env").Use(p, "l fog 8b8989");
@ -673,7 +666,45 @@ namespace MCGalaxy.Commands
Command.all.Find("env").Use(p, "l level normal"); Command.all.Find("env").Use(p, "l level normal");
return; return;
} }
break; if (valueText.Equals("gloomy", StringComparison.OrdinalIgnoreCase))//if (args[0] == "gloomy")
{
Command.all.Find("env").Use(p, "l cloud 405875");
Command.all.Find("env").Use(p, "l sky 405875");
Command.all.Find("env").Use(p, "l sun 444466");
Command.all.Find("env").Use(p, "l shadow 3B3B59");
Command.all.Find("env").Use(p, "l fog 6A80A5");
return;
}
if (valueText.Equals("cloudy", StringComparison.OrdinalIgnoreCase))//if (args[0] == "cloudy")
{
Command.all.Find("env").Use(p, "l cloud 8E8E8E");
Command.all.Find("env").Use(p, "l sky 8E8E8E");
Command.all.Find("env").Use(p, "l sun 9b9b9b");
Command.all.Find("env").Use(p, "l shadow 8C8C8C");
Command.all.Find("env").Use(p, "l fog AFAFAF");
return;
}
if (valueText.Equals("sunset", StringComparison.OrdinalIgnoreCase))//if (args[0] == "sunset")
{
Command.all.Find("env").Use(p, "l cloud 9A6551");
Command.all.Find("env").Use(p, "l sky 836668");
Command.all.Find("env").Use(p, "l sun 7F6C60");
Command.all.Find("env").Use(p, "l shadow 46444C");
Command.all.Find("env").Use(p, "l fog FFA322");
return;
}
if (valueText.Equals("midnight2", StringComparison.OrdinalIgnoreCase))//if (args[0] == "midnight")
{
Command.all.Find("env").Use(p, "l cloud 1E223A");
Command.all.Find("env").Use(p, "l sky 070A23");
Command.all.Find("env").Use(p, "l sun 181828");
Command.all.Find("env").Use(p, "l shadow 0F0F19");
Command.all.Find("env").Use(p, "l fog 131947");
return;
}
p.SendMessage("/env l preset [type] -- Uses an env preset on your map");
p.SendMessage("Valid types: Cartoon/Midnight/Midnight2/Noir/Normal/Trippy/Watery/Sunset/Gloomy/Cloudy");
return;
default: default:
Help(p); Help(p);
break; break;

View File

@ -51,12 +51,13 @@ namespace MCGalaxy.Commands
if (grp.name == "banned") if (grp.name == "banned")
{ {
Player.GlobalMessage(plr.color + plr.DisplayName + Server.DefaultColor + " is now &8banned" + Server.DefaultColor + "!"); Player.GlobalMessage(plr.color + plr.name + Server.DefaultColor + " was &8banned" + Server.DefaultColor + " by " + p.color + p.DisplayName + Server.DefaultColor + "!");
} }
else else
{ {
Player.GlobalMessage(plr.color + plr.DisplayName + Server.DefaultColor + "'s rank was set to " + grp.color + grp.name + Server.DefaultColor + "."); Player.GlobalMessage(plr.color + plr.DisplayName + Server.DefaultColor + "'s rank was set to " + grp.color + grp.name + Server.DefaultColor + ".");
Player.GlobalMessage("&6Congratulations!"); plr.SendMessage("&6Congratulations!");
plr.SendMessage("You are now ranked " + grp.color + grp.name + Server.DefaultColor + ", type /help for your new set of commands.");
} }
} }

View File

@ -116,7 +116,8 @@ namespace MCGalaxy.Commands
} }
public override void Help(Player p) public override void Help(Player p)
{ {
Player.SendMessage(p, "/fly - Allows you to fly, it is a bit glitchy, you can't fly while playing CTF."); Player.SendMessage(p, "/fly - The old method of flight before custom clients.");
Player.SendMessage(p, "May not work at all depending on your connection.");
} }
struct Pos { public ushort x, y, z; } struct Pos { public ushort x, y, z; }

View File

@ -15,6 +15,7 @@
or implied. See the Licenses for the specific language governing or implied. See the Licenses for the specific language governing
permissions and limitations under the Licenses. permissions and limitations under the Licenses.
*/ */
using System;
namespace MCGalaxy.Commands namespace MCGalaxy.Commands
{ {
public sealed class CmdMe : Command public sealed class CmdMe : Command
@ -25,7 +26,6 @@ namespace MCGalaxy.Commands
public override bool museumUsable { get { return true; } } public override bool museumUsable { get { return true; } }
public override LevelPermission defaultRank { get { return LevelPermission.Banned; } } public override LevelPermission defaultRank { get { return LevelPermission.Banned; } }
public CmdMe() { } public CmdMe() { }
public override void Use(Player p, string message) public override void Use(Player p, string message)
{ {
if (message == "") { Player.SendMessage(p, "You"); return; } if (message == "") { Player.SendMessage(p, "You"); return; }
@ -36,11 +36,11 @@ namespace MCGalaxy.Commands
if (Server.worldChat) if (Server.worldChat)
{ {
Player.GlobalChat(p, p.color + "*" + p.DisplayName + " " + message, false); Player.GlobalChat(p, p.color + "*" + Player.StripColours(p.DisplayName) + p.color + " " + message, false);
} }
else else
{ {
Player.GlobalChatLevel(p, p.color + "*" + p.DisplayName + " " + message, false); Player.GlobalChatLevel(p, p.color + "*" + Player.StripColours(p.DisplayName) + p.color + " " + message, false);
} }
//IRCBot.Say("*" + p.name + " " + message); //IRCBot.Say("*" + p.name + " " + message);
Server.IRC.Say("*" + p.DisplayName + " " + message); Server.IRC.Say("*" + p.DisplayName + " " + message);

View File

@ -100,89 +100,14 @@ namespace MCGalaxy.Commands
else { Player.SendMessage(p, "You can only change the Spawn Point when you are on your own map."); } else { Player.SendMessage(p, "You can only change the Spawn Point when you are on your own map."); }
} }
else if (cmd == "PRESET") else if (cmd == "PRESET")
{
if (par == "MIDNIGHT")
{ {
if (p.level.name.ToUpper().StartsWith(p.name.ToUpper())) if (p.level.name.ToUpper().StartsWith(p.name.ToUpper()))
{ {
Command.all.Find("env").Use(p, "l preset midnight"); Command.all.Find("env").Use(p, "l preset " + par);
return;
} }
else else
{ {
p.SendMessage("This is not your map.."); p.SendMessage("This is not your map.");
return;
}
}
if (par == "CARTOON")
{
if (p.level.name.ToUpper().StartsWith(p.name.ToUpper()))
{
Command.all.Find("env").Use(p, "l preset cartoon");
return;
}
else
{
p.SendMessage("This is not your map..");
return;
}
}
if (par == "NOIR")
{
if (p.level.name.ToUpper().StartsWith(p.name.ToUpper()))
{
Command.all.Find("env").Use(p, "l preset noir");
return;
}
else
{
p.SendMessage("This is not your map..");
return;
}
}
if (par == "TRIPPY")
{
if (p.level.name.ToUpper().StartsWith(p.name.ToUpper()))
{
Command.all.Find("env").Use(p, "l preset trippy");
return;
}
else
{
p.SendMessage("This is not your map..");
return;
}
}
if (par == "WATERY")
{
if (p.level.name.ToUpper().StartsWith(p.name.ToUpper()))
{
Command.all.Find("env").Use(p, "l preset watery");
return;
}
else
{
p.SendMessage("This is not your map..");
return;
}
}
if (par == "NORMAL")
{
if (p.level.name.ToUpper().StartsWith(p.name.ToUpper()))
{
Command.all.Find("env").Use(p, "l preset normal");
return;
}
else
{
p.SendMessage("This is not your map..");
return;
}
}
else
{
Player.SendMessage(p, "/overseer preset [type] -- Uses an env preset on your map");
Player.SendMessage(p, "Valid types: Cartoon/Midnight/Noir/Normal/Trippy/Watery");
} }
} }
else if (cmd == "WEATHER") else if (cmd == "WEATHER")

View File

@ -71,11 +71,11 @@ namespace MCGalaxy.Commands
if (String.IsNullOrEmpty(message) || !Group.Exists(message) || Group.Find(message) == pl.group) if (String.IsNullOrEmpty(message) || !Group.Exists(message) || Group.Find(message) == pl.group)
{ {
totalPlayers++; totalPlayers++;
string foundName = pl.name; string foundName = Player.StripColours(pl.DisplayName);
if (Server.afkset.Contains(pl.name)) if (Server.afkset.Contains(pl.name))
{ {
foundName = pl.name + "-afk"; foundName = Player.StripColours(pl.DisplayName + "-afk");
} }
if (pl.muted) foundName += "[muted]"; if (pl.muted) foundName += "[muted]";

View File

@ -64,9 +64,10 @@ namespace MCGalaxy.Commands
who.hasreadrules = true; who.hasreadrules = true;
if (who.level == Server.mainLevel && Server.mainLevel.permissionbuild == LevelPermission.Guest) { who.SendMessage("You are currently on the guest map where anyone can build"); } if (who.level == Server.mainLevel && Server.mainLevel.permissionbuild == LevelPermission.Guest) { who.SendMessage("You are currently on the guest map where anyone can build"); }
who.SendMessage("Server Rules:"); who.SendMessage("Server Rules:");
if (who.name != p.name) {Player.SendMessage(p, "Sent the rules to " + who.color + who.DisplayName + Server.DefaultColor + ".");}
foreach (string s in rules) foreach (string s in rules)
who.SendMessage(s); who.SendMessage(s);
if (who.name != p.name) {who.SendMessage(p.color + p.DisplayName + Server.DefaultColor + " sent you the rules.");}
} }
else if (p == null && String.IsNullOrEmpty(message)) else if (p == null && String.IsNullOrEmpty(message))
{ {
@ -82,7 +83,15 @@ namespace MCGalaxy.Commands
public override void Help(Player p) public override void Help(Player p)
{ {
Player.SendMessage(p, "/rules [player]- Displays server rules to a player"); if ((int)p.group.Permission >= CommandOtherPerms.GetPerm(this))
{
Player.SendMessage(p, "/rules [player]- Displays server rules to a player.");
Player.SendMessage(p, "If no [player] is given, the rules will be sent to you.");
}
else
{
Player.SendMessage(p, "/rules - Displays the server rules.");
}
} }
} }
} }

View File

@ -110,7 +110,7 @@ namespace MCGalaxy.Commands
newRank.playerList.Add(who.name); newRank.playerList.Add(who.name);
newRank.playerList.Save(); newRank.playerList.Save();
Player.GlobalChat(who, who.color + who.DisplayName + Server.DefaultColor + "'s rank was set to " + newRank.color + newRank.name, false); Player.GlobalChat(who, who.color + who.DisplayName + Server.DefaultColor + "'s rank was set to " + newRank.color + newRank.name + Server.DefaultColor + ".", false);
Player.SendMessage(who, "&6" + msgGave, false); Player.SendMessage(who, "&6" + msgGave, false);
Server.IRC.Say(who.color + who.DisplayName + Server.DefaultColor + "'s rank was set to " + newRank.color + newRank.name + ". Reason: " + msgGave); Server.IRC.Say(who.color + who.DisplayName + Server.DefaultColor + "'s rank was set to " + newRank.color + newRank.name + ". Reason: " + msgGave);

View File

@ -323,7 +323,7 @@ namespace MCGalaxy
all.Add(new CmdXNick()); all.Add(new CmdXNick());
all.Add(new CmdXspawn()); all.Add(new CmdXspawn());
all.Add(new CmdXTColor()); all.Add(new CmdXTColor());
//all.Add(new CmdXTitle()); all.Add(new CmdXTitle());
all.Add(new CmdXundo()); all.Add(new CmdXundo());
all.Add(new CmdZombieGame()); all.Add(new CmdZombieGame());
all.Add(new CmdZone()); all.Add(new CmdZone());

View File

@ -866,7 +866,38 @@ namespace MCGalaxy
tempref.b = 225; tempref.b = 225;
tempref.type = 36; tempref.type = 36;
refCol.Add(tempref); refCol.Add(tempref);
tempref.r = 163;
tempref.g = 163;
tempref.b = 163;
tempref.type = 43; //doubleStair
refCol.Add(tempref);
/*
tempref.r = 217; Turns out the back layer blocks are handled awfully.
tempref.g = 131;
tempref.b = 155;
tempref.type = 55; //lightPink
refCol.Add(tempref);
tempref.r = 56;
tempref.g = 77;
tempref.b = 24;
tempref.type = 56; //forestGreen
refCol.Add(tempref);
tempref.r = 86;
tempref.g = 51;
tempref.b = 28;
tempref.type = 57; //brownWool
refCol.Add(tempref);
tempref.r = 39;
tempref.g = 51;
tempref.b = 154;
tempref.type = 58; //deepBlue
refCol.Add(tempref);
tempref.r = 39;
tempref.g = 117;
tempref.b = 149;
tempref.type = 59; //turk oys
refCol.Add(tempref);
*/
// BACK LAYER BLOCKS // BACK LAYER BLOCKS
tempref.r = 57; tempref.r = 57;
@ -974,6 +1005,7 @@ namespace MCGalaxy
tempref.b = 0; tempref.b = 0;
tempref.type = 49; tempref.type = 49;
refCol.Add(tempref); refCol.Add(tempref);
} }
else if (popType == 2) // poptype 2 = 1 layer color image else if (popType == 2) // poptype 2 = 1 layer color image
{ {

View File

@ -223,9 +223,6 @@
<Compile Include="Plugins\Utils\Priority.cs" /> <Compile Include="Plugins\Utils\Priority.cs" />
<Compile Include="Translate.cs" /> <Compile Include="Translate.cs" />
<Compile Include="Commands\CmdLocation.cs" /> <Compile Include="Commands\CmdLocation.cs" />
<Compile Include="Commands\CmdMark.cs" />
<Compile Include="Commands\CmdRanks.cs" />
<Compile Include="Commands\CmdXModel.cs" />
<Compile Include="Commands\CmdAscend.cs" /> <Compile Include="Commands\CmdAscend.cs" />
<Compile Include="Commands\CmdBanEdit.cs" /> <Compile Include="Commands\CmdBanEdit.cs" />
<Compile Include="Commands\CmdDescend.cs" /> <Compile Include="Commands\CmdDescend.cs" />

View File

@ -1102,7 +1102,7 @@ namespace MCGalaxy {
{ {
extension = true; extension = true;
SendExtInfo(11); SendExtInfo(12);
SendExtEntry("ClickDistance", 1); SendExtEntry("ClickDistance", 1);
SendExtEntry("CustomBlocks", 1); SendExtEntry("CustomBlocks", 1);
SendExtEntry("HeldBlock", 1); SendExtEntry("HeldBlock", 1);
@ -2347,7 +2347,7 @@ try { SendBlockchange(pos1.x, pos1.y, pos1.z, Block.waterstill); } catch { }
text = text.Remove(0, 2); text = text.Remove(0, 2);
if ( text.Length < 1 ) { SendMessage("No message entered"); return; } if ( text.Length < 1 ) { SendMessage("No message entered"); return; }
SendChat(this, Server.DefaultColor + "[<] Console: &f" + text); SendChat(this, Server.DefaultColor + "[<] Console: &f" + text);
Server.s.Log("[>] " + this.DisplayName + ": " + text); Server.s.Log("[>] " + this.name + ": " + text);
return; return;
} }
if ( text[0] == '@' || whisper ) { if ( text[0] == '@' || whisper ) {
@ -3042,12 +3042,6 @@ return;
retryTag: try { retryTag: try {
foreach ( string line in Wordwrap(message) ) { foreach ( string line in Wordwrap(message) ) {
string newLine = line; string newLine = line;
if ( newLine.TrimEnd(' ')[newLine.TrimEnd(' ').Length - 1] < '!' ) {
if (HasExtension("EmoteFix"))
{
newLine += '\'';
}
}
StringFormat(newLine, 64).CopyTo(buffer, 1); StringFormat(newLine, 64).CopyTo(buffer, 1);
SendRaw(13, buffer); SendRaw(13, buffer);
} }