mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-22 12:05:51 -04:00
Kill off obsolete methods
This commit is contained in:
parent
55ea39630d
commit
049a0b71f9
@ -90,11 +90,6 @@ namespace MCGalaxy {
|
|||||||
&& block < CpeCount;
|
&& block < CpeCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool RightClick(byte block, bool countAir = false) {
|
|
||||||
if (countAir && block == Air) return true;
|
|
||||||
return block >= Water && block <= StillLava;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static bool BuildIn(byte block) {
|
public static bool BuildIn(byte block) {
|
||||||
if (block == Op_Water || block == Op_Lava
|
if (block == Op_Water || block == Op_Lava
|
||||||
|| Props[block].IsPortal || Props[block].IsMessageBlock) return false;
|
|| Props[block].IsPortal || Props[block].IsMessageBlock) return false;
|
||||||
@ -190,11 +185,5 @@ namespace MCGalaxy {
|
|||||||
lvl.UpdateBlockHandlers();
|
lvl.UpdateBlockHandlers();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[Obsolete("Use BlockPerms.CanModify()")]
|
|
||||||
public static bool canPlace(Player p, byte type) { return BlockPerms.UsableBy(p, type); }
|
|
||||||
|
|
||||||
[Obsolete("Use BlockPerms.CanModify()")]
|
|
||||||
public static bool canPlace(LevelPermission perm, byte type) { return BlockPerms.UsableBy(perm, type); }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@ namespace MCGalaxy.Commands.CPE {
|
|||||||
Entities.UpdateModel(who, model);
|
Entities.UpdateModel(who, model);
|
||||||
|
|
||||||
if (p != who) {
|
if (p != who) {
|
||||||
Player.GlobalMessage(who, who.ColoredName + "'s %Smodel was changed to a &c" + model);
|
Player.SendChatFrom(who, who.ColoredName + "'s %Smodel was changed to a &c" + model, false);
|
||||||
} else {
|
} else {
|
||||||
Player.Message(who, "Changed your own model to a &c" + model);
|
Player.Message(who, "Changed your own model to a &c" + model);
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@ namespace MCGalaxy.Commands.CPE {
|
|||||||
Entities.GlobalRespawn(who);
|
Entities.GlobalRespawn(who);
|
||||||
|
|
||||||
if (p != who) {
|
if (p != who) {
|
||||||
Player.GlobalMessage(who, who.ColoredName + "'s %Sskin was changed to &c" + skin);
|
Player.SendChatFrom(who, who.ColoredName + "'s %Sskin was changed to &c" + skin, false);
|
||||||
} else {
|
} else {
|
||||||
Player.Message(who, "Changed your own skin to &c" + skin);
|
Player.Message(who, "Changed your own skin to &c" + skin);
|
||||||
}
|
}
|
||||||
|
@ -26,6 +26,11 @@ namespace MCGalaxy.Drawing.Ops {
|
|||||||
public override string Name { get { return "Hollow"; } }
|
public override string Name { get { return "Hollow"; } }
|
||||||
public byte Skip;
|
public byte Skip;
|
||||||
|
|
||||||
|
static bool CanHollow(byte block, bool andAir = false) {
|
||||||
|
if (andAir && block == Block.Air) return true;
|
||||||
|
return block >= Block.Water && block <= Block.StillLava;
|
||||||
|
}
|
||||||
|
|
||||||
public override void Perform(Vec3S32[] marks, Brush brush, DrawOpOutput output) {
|
public override void Perform(Vec3S32[] marks, Brush brush, DrawOpOutput output) {
|
||||||
Vec3U16 p1 = Clamp(Min), p2 = Clamp(Max);
|
Vec3U16 p1 = Clamp(Min), p2 = Clamp(Max);
|
||||||
ExtBlock air = ExtBlock.Air;
|
ExtBlock air = ExtBlock.Air;
|
||||||
@ -36,7 +41,7 @@ namespace MCGalaxy.Drawing.Ops {
|
|||||||
{
|
{
|
||||||
bool hollow = true;
|
bool hollow = true;
|
||||||
byte tile = Level.GetTile(x, y, z);
|
byte tile = Level.GetTile(x, y, z);
|
||||||
if (!Block.RightClick(Block.Convert(tile), true) && tile != Skip) {
|
if (!CanHollow(Block.Convert(tile), true) && tile != Skip) {
|
||||||
CheckTile(x - 1, y, z, ref hollow);
|
CheckTile(x - 1, y, z, ref hollow);
|
||||||
CheckTile(x + 1, y, z, ref hollow);
|
CheckTile(x + 1, y, z, ref hollow);
|
||||||
CheckTile(x, y - 1, z, ref hollow);
|
CheckTile(x, y - 1, z, ref hollow);
|
||||||
@ -53,7 +58,7 @@ namespace MCGalaxy.Drawing.Ops {
|
|||||||
|
|
||||||
void CheckTile(int x, int y, int z, ref bool hollow) {
|
void CheckTile(int x, int y, int z, ref bool hollow) {
|
||||||
byte tile = Level.GetTile((ushort)x, (ushort)y, (ushort)z);
|
byte tile = Level.GetTile((ushort)x, (ushort)y, (ushort)z);
|
||||||
if (Block.RightClick(Block.Convert(tile)) || tile == Skip)
|
if (CanHollow(Block.Convert(tile)) || tile == Skip)
|
||||||
hollow = false;
|
hollow = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -148,11 +148,6 @@ namespace MCGalaxy {
|
|||||||
if (p.level == level) p.SendBlockchange(x, y, z, block);
|
if (p.level == level) p.SendBlockchange(x, y, z, block);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[Obsolete("Use SendChatFrom() instead.")]
|
|
||||||
public static void GlobalChat(Player from, string message) { SendChatFrom(from, message, true); }
|
|
||||||
[Obsolete("Use SendChatFrom() instead.")]
|
|
||||||
public static void GlobalChat(Player from, string message, bool showname) { SendChatFrom(from, message, showname); }
|
|
||||||
|
|
||||||
public static void SendChatFrom(Player from, string message) { SendChatFrom(from, message, true); }
|
public static void SendChatFrom(Player from, string message) { SendChatFrom(from, message, true); }
|
||||||
public static void SendChatFrom(Player from, string message, bool showname) {
|
public static void SendChatFrom(Player from, string message, bool showname) {
|
||||||
@ -168,11 +163,6 @@ namespace MCGalaxy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static List<ChatMessage> Last50Chat = new List<ChatMessage>();
|
public static List<ChatMessage> Last50Chat = new List<ChatMessage>();
|
||||||
[Obsolete("Use Chat.MessageAll() instead")]
|
|
||||||
public static void GlobalMessage(string message) { Chat.MessageGlobal(message); }
|
|
||||||
[Obsolete("Use Chat.MessageAll() instead")]
|
|
||||||
public static void GlobalMessage(string message, bool global) { Chat.MessageGlobal(message); }
|
|
||||||
|
|
||||||
public static void GlobalIRCMessage(string srcNick, string message) {
|
public static void GlobalIRCMessage(string srcNick, string message) {
|
||||||
message = Colors.Escape(message);
|
message = Colors.Escape(message);
|
||||||
Player[] players = PlayerInfo.Online.Items;
|
Player[] players = PlayerInfo.Online.Items;
|
||||||
@ -183,11 +173,6 @@ namespace MCGalaxy {
|
|||||||
Player.Message(p, message);
|
Player.Message(p, message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void GlobalMessage(Player from, string message) {
|
|
||||||
if (from == null) Chat.MessageGlobal(message);
|
|
||||||
else SendChatFrom(from, message, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool MarkPossessed(string marker = "") {
|
public bool MarkPossessed(string marker = "") {
|
||||||
if (marker.Length > 0) {
|
if (marker.Length > 0) {
|
||||||
|
@ -39,8 +39,8 @@ namespace MCGalaxy {
|
|||||||
new ColumnDesc("totalKicked", ColumnType.Int24),
|
new ColumnDesc("totalKicked", ColumnType.Int24),
|
||||||
new ColumnDesc("TimeSpent", ColumnType.VarChar, 20),
|
new ColumnDesc("TimeSpent", ColumnType.VarChar, 20),
|
||||||
new ColumnDesc("color", ColumnType.VarChar, 6),
|
new ColumnDesc("color", ColumnType.VarChar, 6),
|
||||||
new ColumnDesc("title_color", ColumnType.VarChar, 6),
|
new ColumnDesc("title_color", ColumnType.VarChar, 6),
|
||||||
new ColumnDesc("Messages", ColumnType.UInt24),
|
new ColumnDesc("Messages", ColumnType.UInt24),
|
||||||
};
|
};
|
||||||
|
|
||||||
static ColumnDesc[] createOpstats = new ColumnDesc[] {
|
static ColumnDesc[] createOpstats = new ColumnDesc[] {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user