Don't allow breaking right-clickable tiles, fix /item and /give logic
This commit is contained in:
parent
e50386084c
commit
fde99208f5
2 changed files with 6 additions and 6 deletions
|
|
@ -1870,7 +1870,7 @@ namespace TShockAPI
|
|||
|
||||
Item selectedItem = args.Player.SelectedItem;
|
||||
int lastKilledProj = args.Player.LastKilledProjectile;
|
||||
if (action == EditAction.KillTile && !Main.tileCut[Main.tile[tileX, tileY].type] && !breakableTiles.Contains(Main.tile[tileX, tileY].type))
|
||||
if (action == EditAction.KillTile && !Main.tileCut[Main.tile[tileX, tileY].type])
|
||||
{
|
||||
// If the tile is an axe tile and they aren't selecting an axe, they're hacking.
|
||||
if (Main.tileAxe[Main.tile[tileX, tileY].type] && (selectedItem.axe == 0 && selectedItem.explosive == 0 && args.Player.RecentFuse == 0))
|
||||
|
|
@ -1984,7 +1984,7 @@ namespace TShockAPI
|
|||
}
|
||||
}
|
||||
|
||||
if (TShock.Config.AllowCutTilesAndBreakables && (Main.tileCut[Main.tile[tileX, tileY].type] || breakableTiles.Contains(Main.tile[tileX, tileY].type)))
|
||||
if (TShock.Config.AllowCutTilesAndBreakables && Main.tileCut[Main.tile[tileX, tileY].type])
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue