mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-10-07 23:07:26 +00:00
Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
27 lines
1.0 KiB
C#
27 lines
1.0 KiB
C#
using Robust.Shared.Interfaces.Map;
|
|
using Robust.Shared.IoC;
|
|
using Robust.Shared.Map;
|
|
|
|
namespace Content.Server.GameObjects.EntitySystems.AI.Steering
|
|
{
|
|
public sealed class GridTargetSteeringRequest : IAiSteeringRequest
|
|
{
|
|
public SteeringStatus Status { get; set; } = SteeringStatus.Pending;
|
|
public MapCoordinates TargetMap { get; }
|
|
public GridCoordinates TargetGrid { get; }
|
|
/// <inheritdoc />
|
|
public float ArrivalDistance { get; }
|
|
/// <inheritdoc />
|
|
public float PathfindingProximity { get; }
|
|
|
|
public GridTargetSteeringRequest(GridCoordinates targetGrid, float arrivalDistance, float pathfindingProximity = 0.5f)
|
|
{
|
|
// Get it once up front so we the manager doesn't have to continuously get it
|
|
var mapManager = IoCManager.Resolve<IMapManager>();
|
|
TargetMap = targetGrid.ToMap(mapManager);
|
|
TargetGrid = targetGrid;
|
|
ArrivalDistance = arrivalDistance;
|
|
PathfindingProximity = pathfindingProximity;
|
|
}
|
|
}
|
|
} |