public abstract bool TryMarkAsResolved(IEntityLookup entityLookup, Point currentAbsolutePosition, out MovementOrderBase newOrder);
public override bool TryMarkAsResolved(IEntityLookup entityLookup, Point currentAbsolutePosition, out MovementOrderBase newOrder) { newOrder = null; if (currentAbsolutePosition != InterceptPoint) { return(false); } var targetEntity = entityLookup.GetEntity(TargetEntityId); var targetPosition = targetEntity.GetRequiredComponent <EllipticalOrbitalPositionComponent>(); var targetAbsolutePosition = targetPosition.GetCurrentAbsolutePosition(entityLookup); if (currentAbsolutePosition.IsWithinOneMeter(targetAbsolutePosition)) { return(true); } Log.Info($"Reached InterceptPoint ({InterceptPoint.Value.X}, {InterceptPoint.Value.Y}), but target is not nearby ({targetAbsolutePosition.X}, {targetAbsolutePosition.Y})"); newOrder = CloneWithIntercept(null); return(false); }