Files
crystall-punk-14/Content.Server/AI/WorldState/States/Hands/AnyFreeHandState.cs

19 lines
561 B
C#
Raw Normal View History

2021-06-09 22:19:39 +02:00
using Content.Server.Hands.Components;
2022-03-17 20:13:31 +13:00
using Content.Shared.Hands.EntitySystems;
using JetBrains.Annotations;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
namespace Content.Server.AI.WorldState.States.Hands
{
[UsedImplicitly]
public sealed class AnyFreeHandState : StateData<bool>
{
public override string Name => "AnyFreeHand";
public override bool GetValue()
{
2022-03-17 20:13:31 +13:00
return IoCManager.Resolve<IEntitySystemManager>().GetEntitySystem<SharedHandsSystem>().TryGetEmptyHand(Owner, out _);
}
}
}