mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-26 14:54:12 -04:00
Merge branch 'master' of github.com:Hetal728/MCGalaxy
This commit is contained in:
commit
47911b6e29
@ -21,9 +21,9 @@ using System.Threading;
|
|||||||
|
|
||||||
namespace MCGalaxy.Commands {
|
namespace MCGalaxy.Commands {
|
||||||
|
|
||||||
public sealed class CmdMapAuthor : Command {
|
public sealed class CmdMapSet : Command {
|
||||||
public override string name { get { return "mapauthors"; } }
|
public override string name { get { return "mapset"; } }
|
||||||
public override string shortcut { get { return "authors"; } }
|
public override string shortcut { get { return "mset"; } }
|
||||||
public override string type { get { return CommandTypes.Games; } }
|
public override string type { get { return CommandTypes.Games; } }
|
||||||
public override bool museumUsable { get { return true; } }
|
public override bool museumUsable { get { return true; } }
|
||||||
public override LevelPermission defaultRank { get { return LevelPermission.Operator; } }
|
public override LevelPermission defaultRank { get { return LevelPermission.Operator; } }
|
||||||
@ -31,14 +31,20 @@ namespace MCGalaxy.Commands {
|
|||||||
|
|
||||||
public override void Use(Player p, string message) {
|
public override void Use(Player p, string message) {
|
||||||
if (p == null) { MessageInGameOnly(p); return; }
|
if (p == null) { MessageInGameOnly(p); return; }
|
||||||
p.level.Authors = message;
|
if (message == "") {
|
||||||
Player.SendMessage(p, "Sets the authors of the map to: " + message.Replace(" ", "%S, "));
|
Player.SendMessage(p, "Map authors: " + p.level.Authors);
|
||||||
|
Player.SendMessage(p, "Pillaring allowed: " + p.level.Pillaring);
|
||||||
|
}
|
||||||
|
p.level.Authors = message.Replace(" ", "%S, ")
|
||||||
|
Player.SendMessage(p, "Sets the authors of the map to: " + message);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Help(Player p) {
|
public override void Help(Player p) {
|
||||||
Player.SendMessage(p, "%T/mapauthors [name1] <name2>...");
|
Player.SendMessage(p, "%T/mapset author [name1] <name2>...");
|
||||||
Player.SendMessage(p, "%HSets the authors of the current map. " +
|
Player.SendMessage(p, "%HSets the authors of the current map. " +
|
||||||
"This is shown to players at the start of rounds in various games.");
|
"This is shown to players at the start of rounds in various games.");
|
||||||
|
Player.SendMessage(p, "%T/mapset pillaring [true/false]");
|
||||||
|
Player.SendMessage(p, "%HSets whether players can pillar on this map in various games.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -24,7 +24,7 @@ namespace MCGalaxy.Games {
|
|||||||
|
|
||||||
public override bool HandlesManualChange(Player p, ushort x, ushort y, ushort z,
|
public override bool HandlesManualChange(Player p, ushort x, ushort y, ushort z,
|
||||||
byte action, byte tile, byte b) {
|
byte action, byte tile, byte b) {
|
||||||
if (action == 1 && noPillaring && !p.referee) {
|
if (action == 1 && !CurrentLevel.Pillaring && !p.referee) {
|
||||||
if (p.lastYblock == y - 1 && p.lastXblock == x && p.lastZblock == z ) {
|
if (p.lastYblock == y - 1 && p.lastXblock == x && p.lastZblock == z ) {
|
||||||
p.blocksStacked++;
|
p.blocksStacked++;
|
||||||
} else {
|
} else {
|
||||||
@ -133,7 +133,7 @@ namespace MCGalaxy.Games {
|
|||||||
p.SendMessage("This map has &a" + CurrentLevel.Likes +
|
p.SendMessage("This map has &a" + CurrentLevel.Likes +
|
||||||
" likes %Sand &c" + CurrentLevel.Dislikes + " dislikes");
|
" likes %Sand &c" + CurrentLevel.Dislikes + " dislikes");
|
||||||
if (CurrentLevel.Authors != "")
|
if (CurrentLevel.Authors != "")
|
||||||
p.SendMessage("It was created by " + CurrentLevel.Authors.Replace(" ", "%S, "));
|
p.SendMessage("It was created by " + CurrentLevel.Authors);
|
||||||
p.SendCpeMessage(CpeMessageType.BottomRight1, "%SYou have &a" + p.money + " %S" + Server.moneys);
|
p.SendCpeMessage(CpeMessageType.BottomRight1, "%SYou have &a" + p.money + " %S" + Server.moneys);
|
||||||
UpdatePlayerStatus(p);
|
UpdatePlayerStatus(p);
|
||||||
return;
|
return;
|
||||||
|
@ -83,6 +83,7 @@ namespace MCGalaxy.Levels.IO {
|
|||||||
writer.WriteLine("Likes = " + level.Likes);
|
writer.WriteLine("Likes = " + level.Likes);
|
||||||
writer.WriteLine("Dislikes = " + level.Dislikes);
|
writer.WriteLine("Dislikes = " + level.Dislikes);
|
||||||
writer.WriteLine("Authors = " + level.Authors);
|
writer.WriteLine("Authors = " + level.Authors);
|
||||||
|
writer.WriteLine("Pillaring = " + level.Pillaring);
|
||||||
}
|
}
|
||||||
|
|
||||||
static string GetName(LevelPermission perm) {
|
static string GetName(LevelPermission perm) {
|
||||||
@ -225,6 +226,8 @@ namespace MCGalaxy.Levels.IO {
|
|||||||
level.Dislikes = int.Parse(value); break;
|
level.Dislikes = int.Parse(value); break;
|
||||||
case "authors":
|
case "authors":
|
||||||
level.Authors = value; break;
|
level.Authors = value; break;
|
||||||
|
case "pillaring":
|
||||||
|
level.Pillaring = bool.Parse(value); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -204,8 +204,10 @@ namespace MCGalaxy
|
|||||||
BufferedBlockSender bulkSender;
|
BufferedBlockSender bulkSender;
|
||||||
|
|
||||||
public List<C4.C4s> C4list = new List<C4.C4s>();
|
public List<C4.C4s> C4list = new List<C4.C4s>();
|
||||||
|
// Games fields
|
||||||
public int Likes, Dislikes;
|
public int Likes, Dislikes;
|
||||||
public string Authors = "";
|
public string Authors = "";
|
||||||
|
public bool Pillaring = !Server.zombie.noPillaring;
|
||||||
|
|
||||||
public Level(string n, ushort x, ushort y, ushort z, string type, int seed = 0, bool useSeed = false)
|
public Level(string n, ushort x, ushort y, ushort z, string type, int seed = 0, bool useSeed = false)
|
||||||
{
|
{
|
||||||
|
@ -181,7 +181,7 @@
|
|||||||
<Compile Include="Commands\Fun\CmdFlipHeads.cs" />
|
<Compile Include="Commands\Fun\CmdFlipHeads.cs" />
|
||||||
<Compile Include="Commands\Fun\CmdGun.cs" />
|
<Compile Include="Commands\Fun\CmdGun.cs" />
|
||||||
<Compile Include="Commands\Fun\CmdLavaSurvival.cs" />
|
<Compile Include="Commands\Fun\CmdLavaSurvival.cs" />
|
||||||
<Compile Include="Commands\Fun\CmdMapAuthors.cs" />
|
<Compile Include="Commands\Fun\CmdMapSet.cs" />
|
||||||
<Compile Include="Commands\Fun\CmdMissile.cs" />
|
<Compile Include="Commands\Fun\CmdMissile.cs" />
|
||||||
<Compile Include="Commands\Fun\CmdSlap.cs" />
|
<Compile Include="Commands\Fun\CmdSlap.cs" />
|
||||||
<Compile Include="Commands\Fun\CmdTeam.cs" />
|
<Compile Include="Commands\Fun\CmdTeam.cs" />
|
||||||
|
@ -412,7 +412,7 @@ namespace MCGalaxy
|
|||||||
if (File.Exists("externalurl.txt")) File.Move("externalurl.txt", "text/externalurl.txt");
|
if (File.Exists("externalurl.txt")) File.Move("externalurl.txt", "text/externalurl.txt");
|
||||||
if (File.Exists("autoload.txt")) File.Move("autoload.txt", "text/autoload.txt");
|
if (File.Exists("autoload.txt")) File.Move("autoload.txt", "text/autoload.txt");
|
||||||
if (File.Exists("IRC_Controllers.txt")) File.Move("IRC_Controllers.txt", "ranks/IRC_Controllers.txt");
|
if (File.Exists("IRC_Controllers.txt")) File.Move("IRC_Controllers.txt", "ranks/IRC_Controllers.txt");
|
||||||
if (useWhitelist) if (File.Exists("whitelist.txt")) File.Move("whitelist.txt", "ranks/whitelist.txt");
|
if (useWhitelist && File.Exists("whitelist.txt")) File.Move("whitelist.txt", "ranks/whitelist.txt");
|
||||||
}
|
}
|
||||||
catch { }
|
catch { }
|
||||||
Chat.LoadCustomTokens();
|
Chat.LoadCustomTokens();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user