diff --git a/Content.Server/Stack/StackSystem.cs b/Content.Server/Stack/StackSystem.cs index a81bbecffb..e64197d106 100644 --- a/Content.Server/Stack/StackSystem.cs +++ b/Content.Server/Stack/StackSystem.cs @@ -28,23 +28,6 @@ namespace Content.Server.Stack SubscribeLocalEvent(OnStackInteractUsing); } - /// - /// Try to use an amount of items on this stack. Returns whether this succeeded. - /// - public bool Use(EntityUid uid, SharedStackComponent stack, int amount) - { - // Check if we have enough things in the stack for this... - if (stack.Count < amount) - { - // Not enough things in the stack, return false. - return false; - } - - // We do have enough things in the stack, so remove them and change. - SetCount(uid, stack, stack.Count - amount); - return true; - } - /// /// Try to split this stack into two. Returns a non-null if successful. /// diff --git a/Content.Shared/Stacks/SharedStackSystem.cs b/Content.Shared/Stacks/SharedStackSystem.cs index 02fb549a51..b6c85dae77 100644 --- a/Content.Shared/Stacks/SharedStackSystem.cs +++ b/Content.Shared/Stacks/SharedStackSystem.cs @@ -60,7 +60,24 @@ namespace Content.Shared.Stacks if (ComponentManager.TryGetComponent(uid, out SharedAppearanceComponent? appearance)) appearance.SetData(StackVisuals.Actual, component.Count); - RaiseLocalEvent(uid, new StackCountChangedEvent(old, component.Count)); + RaiseLocalEvent(uid, new StackCountChangedEvent(old, component.Count), false); + } + + /// + /// Try to use an amount of items on this stack. Returns whether this succeeded. + /// + public bool Use(EntityUid uid, SharedStackComponent stack, int amount) + { + // Check if we have enough things in the stack for this... + if (stack.Count < amount) + { + // Not enough things in the stack, return false. + return false; + } + + // We do have enough things in the stack, so remove them and change. + SetCount(uid, stack, stack.Count - amount); + return true; } private void OnStackGetState(EntityUid uid, SharedStackComponent component, ref ComponentGetState args)