2020-07-18 22:51:56 -07:00
|
|
|
|
using Content.Server.AI.WorldState;
|
2020-06-18 22:52:44 +10:00
|
|
|
|
using Content.Server.AI.WorldState.States;
|
2020-06-24 02:21:20 +02:00
|
|
|
|
using Content.Shared.GameObjects.EntitySystems;
|
2020-06-18 22:52:44 +10:00
|
|
|
|
|
|
|
|
|
|
namespace Content.Server.AI.Utility.Considerations.ActionBlocker
|
|
|
|
|
|
{
|
|
|
|
|
|
public sealed class CanMoveCon : Consideration
|
|
|
|
|
|
{
|
2020-07-08 09:37:35 +10:00
|
|
|
|
protected override float GetScore(Blackboard context)
|
2020-06-18 22:52:44 +10:00
|
|
|
|
{
|
|
|
|
|
|
var self = context.GetState<SelfState>().GetValue();
|
|
|
|
|
|
if (!ActionBlockerSystem.CanMove(self))
|
|
|
|
|
|
{
|
|
|
|
|
|
return 0.0f;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return 1.0f;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|