Purge "initial vanilla inventory" from playerdata, and pushed it to the SSC config creation if not existing.

This commit is contained in:
Zack Piispanen 2015-03-16 12:47:44 -04:00
parent 2658aa1c6d
commit 8a7aae9143
2 changed files with 14 additions and 12 deletions

View file

@ -17,6 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using System;
using System.Collections.Generic;
using System.IO;
using TShockAPI.ServerSideCharacters;
@ -112,6 +113,19 @@ namespace TShockAPI
TShock.ServerSideCharacterConfig = ServerSideConfig.Read(ServerSideCharacterConfigPath);
// Add all the missing config properties in the json file
}
else
{
TShock.ServerSideCharacterConfig = new ServerSideConfig
{
StartingInventory =
new List<NetItem>()
{
new NetItem() {netID = -15, stack = 1, prefix = 0},
new NetItem() {netID = -13, stack = 1, prefix = 0},
new NetItem() {netID = -16, stack = 1, prefix = 0}
}
};
}
TShock.ServerSideCharacterConfig.Write(ServerSideCharacterConfigPath);
}