When deconstructing the Alice vest so it has no capacity for storage the inventory UI code encounters a situation that is not yet handled in code.
s. steps to reproduce
Class: 'SCR_InventoryStorageLBSUI' Function: 'GetOccupiedVolumePercentage' Stack trace: Scripts/Game/UI/Inventory/SCR_InventoryStorageBaseUI.c:1098 Function GetOccupiedVolumePercentage Scripts/Game/UI/Inventory/SCR_InventoryMenuUI.c:2617 Function ResetHighlightsOnAvailableStorages Scripts/Game/UI/Inventory/SCR_InventoryMenuUI.c:2336 Function Action_StepBack Scripts/Game/UI/Inventory/SCR_InventoryMenuUI.c:674 Function OnAction Scripts/Game/UI/Components/SCR_InventoryNavigationButtonBack.c:40 Function OnInput
To fix this I think all that needs to be done is add a divide by zero check on the function SCR_InventoryStorageBaseUI::GetOccupiedVolumePercentage :
//------------------------------------------------------------------------------------------------ float GetOccupiedVolumePercentage(BaseInventoryStorageComponent storage, float occupiedSpace = 0) { if (!storage) return -1; float occupiedVolumePercantage; float capacity = GetMaxVolumeCapacity(storage); if (capacity <= 0) return -1; // <<<<<< Check here. Not sure if return -1 or return 0 would be the goal here if (occupiedSpace != 0) occupiedVolumePercantage = Math.Round(occupiedSpace / (capacity / 100)); else occupiedVolumePercantage = Math.Round(GetOccupiedVolume(storage) / (capacity / 100)); return occupiedVolumePercantage; }