Use more descriptive name for BlockProperties fields.

This commit is contained in:
UnknownShadow200 2016-05-11 11:40:51 +10:00
parent 408dafe1ed
commit 11d3a6041c
5 changed files with 15 additions and 15 deletions

View File

@ -60,10 +60,10 @@ namespace MCGalaxy {
}
if ((i >= red && i <= white) || (i >= lightpink && i <= turquoise))
Properties[i].KilledByLava = true;
Properties[i].LavaKills = true;
if (i == air || i == shrub || (i >= yellowflower && i <= redmushroom)) {
Properties[i].KilledByLava = true;
Properties[i].KilledByWater = true;
Properties[i].LavaKills = true;
Properties[i].WaterKills = true;
}
// Door blocks
@ -89,10 +89,10 @@ namespace MCGalaxy {
Properties[air_flood_down].SaveConvertId = air;
Properties[air_flood_layer].SaveConvertId = air;
Properties[air_flood_up].SaveConvertId = air;
Properties[wood].KilledByLava = true; Properties[trunk].KilledByLava = true;
Properties[sponge].KilledByLava = true; Properties[bookcase].KilledByLava = true;
Properties[leaf].KilledByLava = true;
Properties[red].IsTrack = true; Properties[op_air].IsTrack = true;
Properties[wood].LavaKills = true; Properties[trunk].LavaKills = true;
Properties[sponge].LavaKills = true; Properties[bookcase].LavaKills = true;
Properties[leaf].LavaKills = true;
Properties[red].IsRails = true; Properties[op_air].IsRails = true;
SetupDefaultNames();
}

View File

@ -138,11 +138,11 @@ namespace MCGalaxy
public static bool Mover(byte type) { return walkthroughHandlers[type] != null; }
public static bool FireKill(byte type) { return type != air && Properties[type].KilledByLava; }
public static bool FireKill(byte type) { return type != air && Properties[type].LavaKills; }
public static bool LavaKill(byte type) { return Properties[type].KilledByLava; }
public static bool LavaKill(byte type) { return Properties[type].LavaKills; }
public static bool WaterKill(byte type) { return Properties[type].KilledByWater; }
public static bool WaterKill(byte type) { return Properties[type].WaterKills; }
public static bool LightPass(byte type, byte extType, BlockDefinition[] defs) {
switch (Convert(type)) {

View File

@ -45,9 +45,9 @@ namespace MCGalaxy.Blocks {
/// <summary> Whether this block is considered a portal. </summary>
public bool IsPortal;
/// <summary> Whether this block is overwritten/killed by water blocks. </summary>
public bool KilledByWater;
public bool WaterKills;
/// <summary> Whether this block is overwritten/killed by lava blocks. </summary>
public bool KilledByLava;
public bool LavaKills;
/// <summary> Whether walkinhg through this block causes the death of that player. </summary>
public bool CausesDeath;
@ -56,7 +56,7 @@ namespace MCGalaxy.Blocks {
public bool OPBlock;
/// <summary> Whether this block should allow trains to go over them. </summary>
public bool IsTrack;
public bool IsRails;
public BlockProps(byte type) {
this = default(BlockProps);

View File

@ -36,7 +36,7 @@ namespace MCGalaxy.BlockPhysics {
byte tileBelow = lvl.GetTile((ushort)(x + cx),(ushort)(y + cy - 1), (ushort)(z + cz));
byte tile = lvl.GetTile((ushort)(x + cx),(ushort)(y + cy), (ushort)(z + cz));
if (Block.Properties[tileBelow].IsTrack && (tile == Block.air || tile == Block.water)) {
if (Block.Properties[tileBelow].IsRails && (tile == Block.air || tile == Block.water)) {
lvl.AddUpdate(lvl.PosToInt((ushort)(x + cx),
(ushort)(y + cy), (ushort)(z + cz)), Block.train);
lvl.AddUpdate(C.b, Block.air);

View File

@ -40,7 +40,7 @@ namespace MCGalaxy {
/// <summary> Gets the name and the group name for the given player. </summary>
public static void GetEntry(Player p, Player dst, out string name, out string group) {
string col = Entities.GetSupportedCol(dst, p.color);
group = Server.TablistGlobal ? "Level " + p.level.name : "&fPlayers";
group = Server.TablistGlobal ? "On " + p.level.name : "&fPlayers";
name = col + p.truename;
if (p.hidden && p.IsAfk) { name += " &f(Hid, &7AFK)"; return; }