mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-26 14:54:12 -04:00
Touchup to team-related code.
This commit is contained in:
parent
75675bf92d
commit
f702c72e6c
@ -102,7 +102,9 @@ namespace MCGalaxy.Commands {
|
||||
Player.SendMessage(p, "\"" + color + "\" is not a valid color."); return;
|
||||
}
|
||||
team.Color = color;
|
||||
team.Action(p, "changed the team color to: " + args[1]);
|
||||
team.UpdatePrefix();
|
||||
Team.SaveList();
|
||||
}
|
||||
|
||||
void HandleCreate(Player p, string[] args) {
|
||||
|
@ -123,7 +123,7 @@ namespace MCGalaxy.Commands {
|
||||
void CheckTile(Level lvl, List<Pos> toSend, int x, int y, int z) {
|
||||
Pos pos;
|
||||
if (lvl.GetTile((ushort)x, (ushort)(y - 1), (ushort)z) == Block.air) {
|
||||
pos.x = (ushort)x; pos.y = (ushort)y; pos.z = (ushort)z;
|
||||
pos.x = (ushort)x; pos.y = (ushort)(y - 1); pos.z = (ushort)z;
|
||||
toSend.Add(pos);
|
||||
}
|
||||
if (lvl.GetTile((ushort)x, (ushort)y, (ushort)z) == Block.air) {
|
||||
|
@ -33,14 +33,14 @@ namespace MCGalaxy.Commands
|
||||
if (args.Length != 2) { Help(p); return; }
|
||||
string value = args[1];
|
||||
|
||||
if (args[0] == "zombie") {
|
||||
if (args[0].CaselessEq("zombie")) {
|
||||
Player who = PlayerInfo.FindOrShowMatches(p, value);
|
||||
if (who == null) return;
|
||||
|
||||
p.SendMessage(value + " was queued.");
|
||||
Server.zombie.queZombie = true;
|
||||
Server.zombie.nextZombie = value;
|
||||
} else if (args[0] == "level") {
|
||||
} else if (args[0].CaselessEq("level")) {
|
||||
if (LevelInfo.ExistsOffline(value)) {
|
||||
p.SendMessage(value + " was queued.");
|
||||
Server.zombie.queLevel = true;
|
||||
|
@ -150,7 +150,7 @@ namespace MCGalaxy {
|
||||
|
||||
public static Item[] Items = { new ColorItem(), new TitleColorItem(),
|
||||
new TitleItem(), new RankItem(), new LevelItem(), new LoginMessageItem(),
|
||||
new LogoutMessageItem(), new BlocksItem() };
|
||||
new LogoutMessageItem(), new BlocksItem(), new QueueLevelItem() };
|
||||
|
||||
public static Item GetItem(string name) {
|
||||
foreach (Item item in Items) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2011 MCForge
|
||||
Copyright 2015 MCGalaxy
|
||||
|
||||
Dual-licensed under the Educational Community License, Version 2.0 and
|
||||
the GNU General Public License, Version 3 (the "Licenses"); you may
|
||||
@ -42,4 +42,26 @@ namespace MCGalaxy.Eco {
|
||||
MakePurchase(p, Price, "%3Blocks: " + (10 * count));
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class QueueLevelItem : SimpleItem {
|
||||
|
||||
public QueueLevelItem() {
|
||||
Aliases = new[] { "queuelevel", "queuelvl", "queue" };
|
||||
Price = 150;
|
||||
}
|
||||
|
||||
public override string Name { get { return "QueueLevel"; } }
|
||||
|
||||
protected override void OnBuyCommand(Player p, string message, string[] args) {
|
||||
if (Server.zombie.queLevel) {
|
||||
Player.SendMessage(p, "Someone else has already queued a level."); return;
|
||||
}
|
||||
if (!LevelInfo.ExistsOffline(message)) {
|
||||
Player.SendMessage(p, "Given level does not exist."); return;
|
||||
}
|
||||
|
||||
Command.all.Find("queue").Use(p, "level " + message);
|
||||
MakePurchase(p, Price, "%3QueueLevel: " + message);
|
||||
}
|
||||
}
|
||||
}
|
@ -54,7 +54,7 @@ namespace MCGalaxy.Games {
|
||||
w.WriteLine("Name=" + pair.Value.Name);
|
||||
w.WriteLine("Color=" + pair.Value.Color);
|
||||
w.WriteLine("Owner=" + pair.Value.Owner);
|
||||
string list = String.Join(",", TeamsList.ToArray());
|
||||
string list = String.Join(",", pair.Value.Members);
|
||||
w.WriteLine("Members=" + list);
|
||||
w.WriteLine("");
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ namespace MCGalaxy.BlockPhysics {
|
||||
ShowWarningFuse(lvl, x, y, z);
|
||||
return;
|
||||
}
|
||||
lvl.MakeExplosion(x, y, z, power);
|
||||
MakeExplosion(lvl, x, y, z, power);
|
||||
}
|
||||
}
|
||||
|
||||
@ -73,7 +73,7 @@ namespace MCGalaxy.BlockPhysics {
|
||||
}
|
||||
if (p.TntWarsKillStreak >= TntWarsGame.Properties.DefaultStreakTwoAmount && game.Streaks)
|
||||
power++;
|
||||
lvl.MakeExplosion(x, y, z, power - 2, true, game);
|
||||
MakeExplosion(lvl, x, y, z, power - 2, true, game);
|
||||
|
||||
List<Player> Killed = new List<Player>();
|
||||
Player[] players = PlayerInfo.Online.Items;
|
||||
@ -94,7 +94,7 @@ namespace MCGalaxy.BlockPhysics {
|
||||
? Block.air : Block.lavastill);
|
||||
return;
|
||||
}
|
||||
lvl.MakeExplosion(x, y, z, 0);
|
||||
MakeExplosion(lvl, x, y, z, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -127,9 +127,10 @@ namespace MCGalaxy.BlockPhysics {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (rand.Next(1, 11) <= 4)
|
||||
int mode = rand.Next(1, 11);
|
||||
if (mode <= 4)
|
||||
lvl.AddUpdate(index, Block.tntexplosion);
|
||||
else if (rand.Next(1, 11) <= 8)
|
||||
else if (mode <= 8)
|
||||
lvl.AddUpdate(index, Block.air);
|
||||
else
|
||||
lvl.AddCheck(index, false, "drop 50 dissipate 8");
|
||||
|
@ -411,7 +411,7 @@
|
||||
<Compile Include="Drawing\DrawOps\WriteDrawOp.cs" />
|
||||
<Compile Include="Drawing\Vector3U16.cs" />
|
||||
<Compile Include="Economy\Awards.cs" />
|
||||
<Compile Include="Economy\BlocksItem.cs" />
|
||||
<Compile Include="Economy\ZombieItems.cs" />
|
||||
<Compile Include="Economy\Economy.cs" />
|
||||
<Compile Include="Economy\Item.cs" />
|
||||
<Compile Include="Economy\LevelItem.cs" />
|
||||
|
@ -585,6 +585,7 @@ namespace MCGalaxy
|
||||
CommandOtherPerms.Load();
|
||||
ProfanityFilter.Init();
|
||||
Alias.Load();
|
||||
Team.LoadList();
|
||||
}
|
||||
|
||||
public static void Setup()
|
||||
|
Loading…
x
Reference in New Issue
Block a user