Files
tbd-station-14/Content.Server/AI/Utility/Considerations/ActionBlocker/CanMoveCon.cs
2020-12-20 04:26:21 +01:00

22 lines
607 B
C#

using Content.Server.AI.WorldState;
using Content.Server.AI.WorldState.States;
using Content.Shared.GameObjects.EntitySystems;
using Content.Shared.GameObjects.EntitySystems.ActionBlocker;
namespace Content.Server.AI.Utility.Considerations.ActionBlocker
{
public sealed class CanMoveCon : Consideration
{
protected override float GetScore(Blackboard context)
{
var self = context.GetState<SelfState>().GetValue();
if (!ActionBlockerSystem.CanMove(self))
{
return 0.0f;
}
return 1.0f;
}
}
}