mirror of
https://github.com/space-wizards/space-station-14.git
synced 2026-02-15 03:31:30 +01:00
22 lines
554 B
C#
22 lines
554 B
C#
using Content.Server.AI.WorldState;
|
|
using Content.Server.AI.WorldState.States;
|
|
using Content.Shared.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 (!EntitySystem.Get<ActionBlockerSystem>().CanMove(self))
|
|
{
|
|
return 0.0f;
|
|
}
|
|
|
|
return 1.0f;
|
|
}
|
|
}
|
|
}
|