Files
tbd-station-14/Content.Shared/Hands/EntitySystems/SharedHandsSystem.Virtual.cs
2023-10-11 20:18:49 +11:00

19 lines
557 B
C#

using Content.Shared.Hands.Components;
namespace Content.Shared.Hands.EntitySystems;
public abstract partial class SharedHandsSystem
{
private void InitializeVirtual()
{
SubscribeLocalEvent<HandVirtualItemComponent, AfterAutoHandleStateEvent>(OnVirtualAfter);
}
private void OnVirtualAfter(EntityUid uid, HandVirtualItemComponent component, ref AfterAutoHandleStateEvent args)
{
// update hands GUI with new entity.
if (ContainerSystem.IsEntityInContainer(uid))
_items.VisualsChanged(uid);
}
}