// Load the inventory from the global save data struct to this instance public bool loadFromDisk(string owner) { var slot = SaveDataScript.inventory_owner_to_slot(owner); _items = SaveDataScript.save_data.item_inventory[slot]; return(true); }
// Save the inventory to disk public void saveToDisk(string owner) { var slot = SaveDataScript.inventory_owner_to_slot(owner); SaveDataScript.save_data.item_inventory[slot] = _items; SaveDataScript.save(); }