Unstable v0.19.1.0

This commit is contained in:
Juan Pablo Arce
2022-08-19 13:59:08 -03:00
parent 6b55adcdd9
commit 1219615d64
192 changed files with 3875 additions and 2648 deletions
@@ -255,7 +255,7 @@ namespace Barotrauma.Items.Components
foreach (DeconstructItem deconstructItem in it.Prefab.DeconstructItems)
{
RegisterItem(deconstructItem.ItemIdentifier);
RegisterItem(deconstructItem.ItemIdentifier, deconstructItem.Amount);
}
if (it.OwnInventory is { } inventory)
@@ -266,15 +266,14 @@ namespace Barotrauma.Items.Components
}
}
void RegisterItem(Identifier identifier)
void RegisterItem(Identifier identifier, int amount = 1)
{
if (itemCounts.ContainsKey(identifier))
{
itemCounts[identifier]++;
itemCounts[identifier] += amount;
return;
}
itemCounts.Add(identifier, 1);
itemCounts.Add(identifier, amount);
}
}