Keep orbit task targets on typed keys

This commit is contained in:
Meta Vens 2026-06-16 15:54:18 +01:00
commit cfc1ddac6d
8 changed files with 137 additions and 10 deletions

View file

@ -37,8 +37,8 @@ public class MoveToEntityState : MoveToState
public class MoveToOrbitState : MoveToState
{
public Guid Orbit { get; set; }
public string OrbitKey { get; set; } = "";
public MoveToOrbitState(Agent agent) : base(agent) { }
protected override float2 TargetPosition => _agent.Ship.Zone.GetOrbitPosition(Orbit);
protected override float2 TargetPosition => _agent.Ship.Zone.GetOrbitPosition(OrbitKey);
}