using Content.Server.AI.EntitySystems; using Content.Server.Station.Systems; using Content.Shared.Movement.Components; using Content.Shared.Roles; using Robust.Shared.Map; using Robust.Shared.Prototypes; namespace Content.Server.AI.Components { [RegisterComponent] [Virtual] public class AiControllerComponent : Component { [DataField("logic")] private float _visionRadius = 8.0f; // TODO: Need to ECS a lot more of the AI first before we can ECS this /// /// Whether the AI is actively iterated. /// public bool Awake { get => _awake; set { if (_awake == value) return; _awake = value; if (_awake) EntitySystem.Get().WakeNPC(this); else EntitySystem.Get().SleepNPC(this); } } [DataField("awake")] private bool _awake = true; [ViewVariables(VVAccess.ReadWrite)] public float VisionRadius { get => _visionRadius; set => _visionRadius = value; } /// /// Is the entity Sprinting (running)? /// [ViewVariables] public bool Sprinting { get; } = true; /// /// Calculated linear velocity direction of the entity. /// [ViewVariables] public Vector2 VelocityDir { get; set; } public virtual void Update(float frameTime) {} } }