Files
crystall-punk-14/Content.Shared/Hands/EntitySystems/SharedHandsSystem.Virtual.cs

19 lines
557 B
C#
Raw Normal View History

2023-07-13 20:20:46 +10:00
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.
2023-10-11 02:18:49 -07:00
if (ContainerSystem.IsEntityInContainer(uid))
2023-07-13 20:20:46 +10:00
_items.VisualsChanged(uid);
}
}