Format issues and tile place check for walls

This commit is contained in:
Zack Piispanen 2012-05-30 18:31:40 -04:00
parent 3e9c88685e
commit 11a85dc817
2 changed files with 10 additions and 8 deletions

View file

@ -1750,7 +1750,7 @@ namespace TShockAPI
return true; return true;
} }
if (type == 1 && !args.Player.Group.HasPermission(Permissions.ignoreplacetiledetection)) if ( ( type == 1 || type == 3 ) && !args.Player.Group.HasPermission(Permissions.ignoreplacetiledetection))
{ {
args.Player.TilePlaceThreshold++; args.Player.TilePlaceThreshold++;
var coords = new Vector2(tileX, tileY); var coords = new Vector2(tileX, tileY);

View file

@ -1289,6 +1289,7 @@ namespace TShockAPI
{ {
if (TShock.Config.AllowIce && actionType != 1) if (TShock.Config.AllowIce && actionType != 1)
{ {
foreach (Point p in player.IceTiles) foreach (Point p in player.IceTiles)
{ {
if (p.X == tileX && p.Y == tileY && (Main.tile[p.X, p.Y].type == 0 || Main.tile[p.X, p.Y].type == 127)) if (p.X == tileX && p.Y == tileY && (Main.tile[p.X, p.Y].type == 0 || Main.tile[p.X, p.Y].type == 127))
@ -1297,11 +1298,12 @@ namespace TShockAPI
return false; return false;
} }
} }
if (((DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond) - player.BPm) > 2000){ if (((DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond) - player.BPm) > 2000){
player.SendMessage("You do not have permission to build!", Color.Red); player.SendMessage("You do not have permission to build!", Color.Red);
player.BPm=DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond; player.BPm=DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond;
}
}
return true; return true;
} }
@ -1314,8 +1316,8 @@ namespace TShockAPI
if (((DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond) - player.BPm) > 2000){ if (((DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond) - player.BPm) > 2000){
player.SendMessage("You do not have permission to build!", Color.Red); player.SendMessage("You do not have permission to build!", Color.Red);
player.BPm=DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond; player.BPm=DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond;
}
}
return true; return true;
} }