diff --git a/web/src/lib/codesync/PlayerActionEvent.ts b/web/src/lib/codesync/PlayerActionEvent.ts index e5d4dd9..f2261a2 100644 --- a/web/src/lib/codesync/PlayerActionEvent.ts +++ b/web/src/lib/codesync/PlayerActionEvent.ts @@ -6,33 +6,27 @@ export type PlayerActionEvent = GameEventBase & { readonly TargetId: number | undefined } -export type PlayerActionName = - | 'AdvanceTimePlayerAction' - | 'BuyTransportCapacityPlayerAction' - | 'HireAgentsPlayerAction' - | 'LaunchMissionPlayerAction' - | 'InvestIntelPlayerAction' - | AgentPlayerActionName +export const AgentPlayerActionNameVal = [ + 'RecallAgentsPlayerAction', + 'SackAgentsPlayerAction', + 'SendAgentsToGatherIntelPlayerAction', + 'SendAgentsToGenerateIncomePlayerAction', + 'SendAgentsToTrainingPlayerAction', +] as const -export type AgentPlayerActionName = - | 'SackAgentsPlayerAction' - | 'SendAgentsToGenerateIncomePlayerAction' - | 'SendAgentsToGatherIntelPlayerAction' - | 'SendAgentsToTrainingPlayerAction' - | 'RecallAgentsPlayerAction' +export type AgentPlayerActionName = (typeof AgentPlayerActionNameVal)[number] -export const PlayerActionNameVal: PlayerActionName[] = [ +export const PlayerActionNameVal = [ 'AdvanceTimePlayerAction', 'BuyTransportCapacityPlayerAction', 'HireAgentsPlayerAction', 'InvestIntelPlayerAction', 'LaunchMissionPlayerAction', 'SackAgentsPlayerAction', - 'SendAgentsToGenerateIncomePlayerAction', - 'SendAgentsToGatherIntelPlayerAction', - 'SendAgentsToTrainingPlayerAction', - 'RecallAgentsPlayerAction', -] + ...AgentPlayerActionNameVal, +] as const + +export type PlayerActionName = (typeof PlayerActionNameVal)[number] export type PlayerActionNameInTurn = Exclude< PlayerActionName,