mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-28 07:56:20 -04:00
Some minor fixes for zombie survival, /store now shows all buyable items if no item name is given.
This commit is contained in:
parent
a0c241f487
commit
a24dbf123d
@ -32,6 +32,14 @@ namespace MCGalaxy.Commands {
|
||||
public override bool Enabled { get { return Economy.Enabled; } }
|
||||
|
||||
public override void Use(Player p, string message) {
|
||||
if (message == "") {
|
||||
foreach (Item item in Economy.Items) {
|
||||
if (!item.Enabled) continue;
|
||||
item.OnStoreCommand(p);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (Item item in Economy.Items)
|
||||
foreach (string alias in item.Aliases)
|
||||
{
|
||||
@ -49,6 +57,8 @@ namespace MCGalaxy.Commands {
|
||||
public override void Help(Player p) {
|
||||
Player.SendMessage(p, "%T/store [item]");
|
||||
Player.SendMessage(p, "%HViews information about the specific item, such as its cost.");
|
||||
Player.SendMessage(p, "%T/store");
|
||||
Player.SendMessage(p, "%HViews information about all enabled items.");
|
||||
Player.SendMessage(p, "%H Available items: %f" + Economy.GetItemNames(", "));
|
||||
}
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ namespace MCGalaxy.Eco {
|
||||
"%c to buy " + (count * 10) + " " + Name + "."); return;
|
||||
}
|
||||
|
||||
p.blocksStacked += 10 * count;
|
||||
p.blockCount += 10 * count;
|
||||
MakePurchase(p, Price * count, "%3Blocks: " + (10 * count));
|
||||
}
|
||||
}
|
||||
|
@ -65,6 +65,7 @@ namespace MCGalaxy.Games {
|
||||
|
||||
public override bool HandlesMovement(Player p, ushort x, ushort y, ushort z,
|
||||
byte rotX, byte rotY) {
|
||||
if (p.level == null || !p.level.name.CaselessEq(CurrentLevelName)) return false;
|
||||
if (!p.referee && noRespawn) {
|
||||
if (p.pos[0] >= x + 70 || p.pos[0] <= x - 70 ) {
|
||||
p.SendPos(0xFF, p.pos[0], p.pos[1], p.pos[2], p.rot[0], p.rot[1]);
|
||||
@ -156,6 +157,8 @@ namespace MCGalaxy.Games {
|
||||
p.SendCpeMessage(CpeMessageType.Status3, "");
|
||||
Alive.Remove(p);
|
||||
Infected.Remove(p);
|
||||
if (oldLvl != null && oldLvl.name.CaselessEq(CurrentLevelName))
|
||||
UpdateAllPlayerStatus();
|
||||
}
|
||||
|
||||
public override void PlayerMoneyChanged(Player p) {
|
||||
|
@ -81,6 +81,7 @@ namespace MCGalaxy.Levels.IO {
|
||||
writer.WriteLine("Dislikes = " + level.Dislikes);
|
||||
writer.WriteLine("Authors = " + level.Authors);
|
||||
writer.WriteLine("Pillaring = " + level.Pillaring);
|
||||
writer.WriteLine("BuildType = " + level.BuildType);
|
||||
}
|
||||
|
||||
static string GetName(LevelPermission perm) {
|
||||
@ -225,6 +226,8 @@ namespace MCGalaxy.Levels.IO {
|
||||
level.Authors = value; break;
|
||||
case "pillaring":
|
||||
level.Pillaring = bool.Parse(value); break;
|
||||
case "buildtype":
|
||||
level.BuildType = (BuildType)Enum.Parse(typeof(BuildType), value); break;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user