From 6359dad213365820da984708328e2b96d8588281 Mon Sep 17 00:00:00 2001 From: White Date: Sat, 31 Dec 2016 12:57:16 +1030 Subject: [PATCH] AllowCutTilesAndBreakables option works better now. Herbs, vines, flowers can be cut inside regions if the option is enabled. Any action that would also break a wall is still ignored. Closes #1334 --- TShockAPI/GetDataHandlers.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/TShockAPI/GetDataHandlers.cs b/TShockAPI/GetDataHandlers.cs index 0a11d898..af9507fe 100644 --- a/TShockAPI/GetDataHandlers.cs +++ b/TShockAPI/GetDataHandlers.cs @@ -2200,8 +2200,13 @@ namespace TShockAPI return true; } } - if (TShock.Config.AllowCutTilesAndBreakables && Main.tileCut[Main.tile[tileX, tileY].type]) + if (TShock.Config.AllowCutTilesAndBreakables && Main.tileCut[tile.type]) { + if (action == EditAction.KillWall) + { + args.Player.SendTileSquare(tileX, tileY, 1); + return true; + } return false; }