Refactor runtime bootstrap and ship control flows
This commit is contained in:
@@ -28,6 +28,13 @@ public enum OrderStatus
|
||||
Interrupted,
|
||||
}
|
||||
|
||||
public enum ShipOrderSourceKind
|
||||
{
|
||||
Player,
|
||||
Behavior,
|
||||
Commander,
|
||||
}
|
||||
|
||||
public enum AiPlanStatus
|
||||
{
|
||||
Planned,
|
||||
@@ -166,6 +173,11 @@ public static class ShipOrderKinds
|
||||
public const string BuildAtSite = "build-at-site";
|
||||
public const string AttackTarget = "attack-target";
|
||||
public const string HoldPosition = "hold-position";
|
||||
public const string MineLocal = "mine-local";
|
||||
public const string MineAndDeliverRun = "mine-and-deliver-run";
|
||||
public const string SellMinedCargo = "sell-mined-cargo";
|
||||
public const string SupplyFleetRun = "supply-fleet-run";
|
||||
public const string SalvageRun = "salvage-run";
|
||||
public const string RepeatOrders = "repeat-orders";
|
||||
public const string Flee = "flee";
|
||||
}
|
||||
@@ -329,6 +341,14 @@ public static class SimulationEnumMappings
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(kind), kind, null),
|
||||
};
|
||||
|
||||
public static string ToContractValue(this ShipOrderSourceKind kind) => kind switch
|
||||
{
|
||||
ShipOrderSourceKind.Player => "player",
|
||||
ShipOrderSourceKind.Behavior => "behavior",
|
||||
ShipOrderSourceKind.Commander => "commander",
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(kind), kind, null),
|
||||
};
|
||||
|
||||
public static string ToContractValue(this ShipState state) => state switch
|
||||
{
|
||||
ShipState.Idle => "idle",
|
||||
|
||||
Reference in New Issue
Block a user