Vault corrections

This commit is contained in:
EmosewaMC
2022-04-13 01:49:55 -07:00
parent e92cdc4f14
commit a32c5a2f3c
6 changed files with 24 additions and 3 deletions

View File

@@ -2173,3 +2173,15 @@ void Entity::AddToGroup(const std::string& group) {
m_Groups.push_back(group);
}
}
void Entity::RetroactiveVaultSize() {
auto inventoryComponent = GetComponent<InventoryComponent>();
if (!inventoryComponent) return;
auto itemsVault = inventoryComponent->GetInventory(eInventoryType::VAULT_ITEMS);
auto modelVault = inventoryComponent->GetInventory(eInventoryType::VAULT_MODELS);
if (itemsVault->GetSize() == modelVault->GetSize()) return;
modelVault->SetSize(itemsVault->GetSize());
}