From 36f368ac202d769c7ab634963cb9f799f55faec4 Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Fri, 25 May 2012 23:29:40 -0600 Subject: [PATCH] Add PreventPiggyBanksOnServerSideInventory config opion --- TShockAPI/ConfigFile.cs | 2 ++ TShockAPI/GetDataHandlers.cs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/TShockAPI/ConfigFile.cs b/TShockAPI/ConfigFile.cs index 794cd277..a885cad6 100644 --- a/TShockAPI/ConfigFile.cs +++ b/TShockAPI/ConfigFile.cs @@ -228,6 +228,8 @@ namespace TShockAPI [Description("Prevent banned items from being /i or /give")] public bool PreventBannedItemSpawn = false; + [Description("Prevent banks on SSI")] public bool PreventPiggyBanksOnServerSideInventory = false; + public static ConfigFile Read(string path) { if (!File.Exists(path)) diff --git a/TShockAPI/GetDataHandlers.cs b/TShockAPI/GetDataHandlers.cs index 3879eb47..a56e7d90 100644 --- a/TShockAPI/GetDataHandlers.cs +++ b/TShockAPI/GetDataHandlers.cs @@ -1682,7 +1682,7 @@ namespace TShockAPI { return true; } - if ((tiletype == 29 || tiletype == 97) && TShock.Config.ServerSideInventory) + if ((tiletype == 29 || tiletype == 97) && TShock.Config.ServerSideInventory && TShock.Config.PreventPiggyBanksOnServerSideInventory) { args.Player.SendMessage("You cannot place this tile, server side inventory is enabled.", Color.Red); args.Player.SendTileSquare(tileX, tileY);