diff --git a/Content.Shared/_CP14/Cargo/Prototype/SellServices/CP14SellWhitelistService.cs b/Content.Shared/_CP14/Cargo/Prototype/SellServices/CP14SellWhitelistService.cs index 38c68aa823..1ee8ddffd0 100644 --- a/Content.Shared/_CP14/Cargo/Prototype/SellServices/CP14SellWhitelistService.cs +++ b/Content.Shared/_CP14/Cargo/Prototype/SellServices/CP14SellWhitelistService.cs @@ -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(ent, out var stack)) + count = stack.Count; + suitable.Add(ent); - needCount -= 1; + needCount -= count; } if (needCount > 0)