/// <summary> /// Opens storage inventory and display /// </summary> public virtual void OpenStorage() { InitializeStorageData(); isOpen = true; if (!File.Exists(_saveFolderName + _saveFileExtension)) { PopulateStorageInventory(); } _storageInventory.LoadSavedInventory(); storageInventoryDisplay.gameObject.SetActive(true); AddStorageDisplayToMainDisplay(); SetupStorageDispaly(); PlayOpenAnimation(); storageInventoryDisplay.SetTargetInventory(_storageInventory); MMInventoryEvent.Trigger(MMInventoryEventType.Redraw, null, _storageInventory.name, null, 0, 0); _inputManager.ToggleInventory(); }
/// <summary> /// Opens vendor inventory and display /// </summary> public virtual void OpenVendor() { InitializeVendor(); _inputManager._inVendor = true; inventoryButtons.SetActive(false); isOpen = true; if (_itemDetails != null) { _itemDetails.vendorUI.SetActive(true); } UpdateVendorItemDisplay(); if (!File.Exists(_saveFolderName + _saveFileExtension)) { PopulateVendorInventory(); } vendorInventory.LoadSavedInventory(); vendorInventoryDisplay.gameObject.SetActive(true); SetupVendorDispaly(); vendorInventoryDisplay.SetTargetInventory(vendorInventory); MMInventoryEvent.Trigger(MMInventoryEventType.Redraw, null, vendorInventory.name, null, 0, 0); AddVendorDisplayToMainDisplay(); _inputManager.ToggleInventory(); }