Repair chest stacks on postinit.
This commit is contained in:
parent
9a4a77dfcc
commit
768e5c13af
1 changed files with 18 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue