Repair chest stacks on postinit.

This commit is contained in:
Zidonuke 2011-12-27 11:11:59 -05:00
parent 9a4a77dfcc
commit 768e5c13af

View file

@ -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;