public void LoadItemStash(ItemStashWindow itemStashWindow, string ItemStashID) { ItemContainerSaveData savedSlots = ItemSaveIO._LoadItems(ItemStashID); if (savedSlots == null) { return; } itemStashWindow.Clear(); for (int i = 0; i < savedSlots.SavedSlots.Length; i++) { ItemSlot itemSlot = itemStashWindow.itemSlots[i]; ItemSlotSaveData savedSlot = savedSlots.SavedSlots[i]; if (savedSlot == null) { itemSlot.Item = null; itemSlot.Amount = 0; } else { itemSlot.Item = itemDatabase.GetItemCopy(savedSlot.ItemID); itemSlot.Amount = savedSlot.Amount; } } }
public void SaveItemStash(ItemStashWindow itemStashWindow, string itemStashID) { SaveItems(itemStashWindow.itemSlots, itemStashID); }
private void Start() { instance = this; }