I noticed that the PlayerData constructor has a TSPlayer parameter, but it's not used, so I marked it obsolete and added a new constructor that has the includingStarterInventory parameter. The bool includingStarterInventory parameter is needed to add items from the SSC config.
In the same way, I noticed that there is a check for the maximum slot (if (slot > (this.inventory.Length - 1))), but no check for the minimum: slot < 0. So I changed the condition in the StoreSlot method to: if (slot > (this.inventory.Length - 1) || slot < 0)
Added overloaded "StoreSlot" method that takes the NetItem parameter.
I noticed that the PlayerData constructor has a
TSPlayer
parameter, but it's not used, so I marked it obsolete and added a new constructor that has theincludingStarterInventory
parameter. Thebool includingStarterInventory
parameter is needed to add items from the SSC config. In the same way, I noticed that there is a check for the maximum slot (if (slot > (this.inventory.Length - 1))
), but no check for the minimum:slot < 0
. So I changed the condition in theStoreSlot
method to:if (slot > (this.inventory.Length - 1) || slot < 0)
Added overloaded "StoreSlot" method that takes the NetItem parameter.