Improve on prev code
Thanks to everyone who helped on discord
This commit is contained in:
parent
98a93693da
commit
6592a880bc
1 changed files with 15 additions and 15 deletions
|
|
@ -304,19 +304,18 @@ 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)
|
||||
{
|
||||
args.Handled = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (selectedItem.placeStyle != style)
|
||||
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)
|
||||
{
|
||||
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));
|
||||
|
|
@ -325,6 +324,7 @@ namespace TShockAPI
|
|||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (action == EditAction.KillTile && !Main.tileCut[tile.type] && !breakableTiles.Contains(tile.type))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue