Update CP14SellWhitelistService.cs

This commit is contained in:
Ed
2025-03-19 13:45:59 +03:00
parent d71fd8ef80
commit 4002b0a41c

View File

@@ -1,3 +1,4 @@
using Content.Shared.Stacks;
using Content.Shared.Whitelist;
using Robust.Shared.Prototypes;
using Robust.Shared.Utility;
@@ -36,8 +37,13 @@ public sealed partial class CP14SellWhitelistService : CP14StoreSellService
if (!whitelistSystem.IsValid(Whitelist, ent))
continue;
var count = 1;
if (entManager.TryGetComponent<StackComponent>(ent, out var stack))
count = stack.Count;
suitable.Add(ent);
needCount -= 1;
needCount -= count;
}
if (needCount > 0)