Update CP14SellWhitelistService.cs
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user