From 768e5c13afb04d333dca407f55ac053c50700c64 Mon Sep 17 00:00:00 2001 From: Zidonuke Date: Tue, 27 Dec 2011 11:11:59 -0500 Subject: [PATCH] Repair chest stacks on postinit. --- TShockAPI/TShock.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs index 8d76efea..07427ffd 100644 --- a/TShockAPI/TShock.cs +++ b/TShockAPI/TShock.cs @@ -416,6 +416,20 @@ namespace TShockAPI StatTracker.checkin(); + FixChestStacks(); + + } + + private void FixChestStacks() + { + foreach(Chest chest in Main.chest) + { + foreach(Item item in chest.item) + { + if (item.stack > item.maxStack) + item.stack = item.maxStack; + } + } } @@ -1187,6 +1201,10 @@ namespace TShockAPI Netplay.serverPort = file.ServerPort; } + if (file.MaxSlots > 250) + file.MaxSlots = 250; + Main.maxNetPlayers = file.MaxSlots + 5; + Netplay.spamCheck = false; RconHandler.Password = file.RconPassword;