Merge with upstream
This commit is contained in:
commit
9f7055b806
13 changed files with 263 additions and 55 deletions
|
|
@ -72,6 +72,7 @@ namespace TShockAPI
|
|||
public static SecureRest RestApi;
|
||||
public static RestManager RestManager;
|
||||
public static Utils Utils = Utils.Instance;
|
||||
public static StatTracker StatTracker = new StatTracker();
|
||||
/// <summary>
|
||||
/// Used for implementing REST Tokens prior to the REST system starting up.
|
||||
/// </summary>
|
||||
|
|
@ -611,14 +612,35 @@ namespace TShockAPI
|
|||
{
|
||||
AuthToken = 0;
|
||||
}
|
||||
|
||||
Regions.Reload();
|
||||
|
||||
Regions.Reload();
|
||||
Warps.ReloadWarps();
|
||||
|
||||
Lighting.lightMode = 2;
|
||||
ComputeMaxStyles();
|
||||
FixChestStacks();
|
||||
|
||||
StatTracker.Initialize();
|
||||
}
|
||||
|
||||
private void ComputeMaxStyles()
|
||||
{
|
||||
var item = new Item();
|
||||
for (int i = 0; i < Main.maxItemTypes; i++)
|
||||
{
|
||||
item.netDefaults(i);
|
||||
if (item.placeStyle > 0)
|
||||
{
|
||||
if (GetDataHandlers.MaxPlaceStyles.ContainsKey(item.createTile))
|
||||
{
|
||||
if (item.placeStyle > GetDataHandlers.MaxPlaceStyles[item.createTile])
|
||||
GetDataHandlers.MaxPlaceStyles[item.createTile] = item.placeStyle;
|
||||
}
|
||||
else
|
||||
GetDataHandlers.MaxPlaceStyles.Add(item.createTile, item.placeStyle);
|
||||
}
|
||||
}
|
||||
}
|
||||
private void FixChestStacks()
|
||||
{
|
||||
if (Config.IgnoreChestStacksOnLoad)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue