Files
tbd-station-14/Content.Client/Stack/StackSystem.cs
Vera Aguilera Puerto d1fe278afc Stack components are now entirely logicless.
- GetState is handled in SharedStackSystem
- Adds friend attributes to the stack components
2021-08-30 11:49:09 +02:00

24 lines
640 B
C#

using Content.Shared.Stacks;
using JetBrains.Annotations;
using Robust.Shared.GameObjects;
namespace Content.Client.Stack
{
[UsedImplicitly]
public class StackSystem : SharedStackSystem
{
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<StackComponent, StackCountChangedEvent>(OnStackCountChanged);
}
private void OnStackCountChanged(EntityUid uid, StackComponent component, StackCountChangedEvent args)
{
// Dirty the UI now that the stack count has changed.
component.UiUpdateNeeded = true;
}
}
}