Files
OldThink/Content.Client/Stack/StackSystem.cs

24 lines
647 B
C#
Raw Normal View History

2021-06-09 22:19:39 +02:00
using Content.Shared.Stacks;
using JetBrains.Annotations;
using Robust.Shared.GameObjects;
2021-06-09 22:19:39 +02:00
namespace Content.Client.Stack
{
[UsedImplicitly]
public sealed 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;
}
}
}