Files
tbd-station-14/Content.Shared/Hands/EntitySystems/SharedHandsSystem.Virtual.cs
2023-07-13 20:20:46 +10:00

19 lines
558 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);
}
}