Expanded item types inside GetSizeByInventoryItemHash

This commit is contained in:
Chomp
2025-02-25 17:35:37 +00:00
parent 4999b80172
commit cb65a20092
+2 -1
View File
@@ -36,6 +36,7 @@ public class InventoryHelper(
)
{
protected InventoryConfig _inventoryConfig = _configServer.GetConfig<InventoryConfig>();
private readonly HashSet<string> _variableSizeItemTypes = [BaseClasses.WEAPON, BaseClasses.FUNCTIONAL_MOD];
/// <summary>
/// Add multiple items to player stash (assuming they all fit)
@@ -708,7 +709,7 @@ public class InventoryHelper(
}
// Calculate size contribution from child items/attachments
if (_itemHelper.IsOfBaseclass(itemTpl, BaseClasses.WEAPON))
if (_itemHelper.IsOfBaseclasses(itemTpl, _variableSizeItemTypes))
{
while (toDo.Count > 0)
{