Add tile banning, because such whine, much desire (doge).

I am sure this will result in someone whining for wall banning as well, but that can wait another couple of months.
This commit is contained in:
Zack 2014-07-27 20:57:17 -04:00
parent eb8ffe5cfb
commit 7a8422de5c
6 changed files with 449 additions and 3 deletions

View file

@ -1910,6 +1910,17 @@ namespace TShockAPI
Item selectedItem = args.Player.SelectedItem;
int lastKilledProj = args.Player.LastKilledProjectile;
Tile tile = Main.tile[tileX, tileY];
if (action == EditAction.PlaceTile)
{
if (TShock.TileBans.TileIsBanned(editData, args.Player))
{
args.Player.SendTileSquare(tileX, tileY, 1);
args.Player.SendErrorMessage("You do not have permission to place this tile.");
return true;
}
}
if (action == EditAction.KillTile && !Main.tileCut[tile.type] && !breakableTiles.Contains(tile.type))
{
// If the tile is an axe tile and they aren't selecting an axe, they're hacking.