Purge "initial vanilla inventory" from playerdata, and pushed it to the SSC config creation if not existing.
This commit is contained in:
parent
2658aa1c6d
commit
8a7aae9143
2 changed files with 14 additions and 12 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue