diff --git a/TShockAPI/Bouncer.cs b/TShockAPI/Bouncer.cs index 78872b1e..56aee30e 100644 --- a/TShockAPI/Bouncer.cs +++ b/TShockAPI/Bouncer.cs @@ -304,26 +304,26 @@ namespace TShockAPI return; } - if (args.Player.TPlayer.unlockedBiomeTorches && args.Player.TPlayer.UsingBiomeTorches && - selectedItem.type == ItemID.Torch && editData == TileID.Torches) + if (args.Player.TPlayer.unlockedBiomeTorches && args.Player.TPlayer.UsingBiomeTorches + && selectedItem.type == ItemID.Torch && editData == TileID.Torches) { - if (style == TorchID.Demon || style == TorchID.Ice || - style == TorchID.Bone || style == TorchID.Desert || - style == TorchID.Corrupt || style == TorchID.Crimson || - style == TorchID.Hallowed || style == TorchID.Jungle) + if (style != TorchID.Demon + && style != TorchID.Ice + && style != TorchID.Bone + && style != TorchID.Desert + && style != TorchID.Corrupt + && style != TorchID.Crimson + && style != TorchID.Hallowed + && style != TorchID.Jungle + && selectedItem.placeStyle != style) { - args.Handled = false; + TShock.Log.ConsoleError(string.Format("Bouncer / OnTileEdit rejected from (placestyle) {0} {1} {2} placeStyle: {3} expectedStyle: {4}", + args.Player.Name, action, editData, style, selectedItem.placeStyle)); + args.Player.SendTileSquare(tileX, tileY, 1); + args.Handled = true; return; } } - else if (selectedItem.placeStyle != style) - { - TShock.Log.ConsoleError(string.Format("Bouncer / OnTileEdit rejected from (placestyle) {0} {1} {2} placeStyle: {3} expectedStyle: {4}", - args.Player.Name, action, editData, style, selectedItem.placeStyle)); - args.Player.SendTileSquare(tileX, tileY, 1); - args.Handled = true; - return; - } } if (action == EditAction.KillTile && !Main.tileCut[tile.type] && !breakableTiles.Contains(tile.type))