Bouncer OnTileEdit - Add new personalstorage tiles for ssc check.

We do not allow piggybank and safe to be placed if SSC is enabled.
The DefendersFroge and VoidVault have the same functionality as far as I know. So adding these two missing tiles.
This commit is contained in:
Patrikkk 2020-06-12 00:56:51 +02:00
parent b633f60567
commit f5e1510f58
2 changed files with 10 additions and 1 deletions

View file

@ -365,7 +365,7 @@ namespace TShockAPI
args.Handled = true;
return;
}
if (action == EditAction.PlaceTile && (editData == TileID.PiggyBank || editData == TileID.Safes) && Main.ServerSideCharacter)
if (action == EditAction.PlaceTile && personalStorageTileIDs.Contains(editData) && Main.ServerSideCharacter)
{
TShock.Log.ConsoleDebug("Bouncer / OnTileEdit rejected from (sscprotect) {0} {1} {2}", args.Player.Name, action, editData);
args.Player.SendErrorMessage("You cannot place this tile because server side characters are enabled.");
@ -2135,6 +2135,14 @@ namespace TShockAPI
TileID.Campfire
};
private static List<int> personalStorageTileIDs = new List<int>()
{
TileID.PiggyBank,
TileID.Safes,
TileID.DefendersForge,
TileID.VoidVault
};
/// <summary>
/// These projectiles have been added or modified with Terraria 1.4.
/// They come from normal items, but to have the directional functionality, they must be projectiles.