Skip to content

Commit

Permalink
fix TS build failures due to missing player action name renames
Browse files Browse the repository at this point in the history
  • Loading branch information
Konrad Jamrozik committed Jun 10, 2024
1 parent 55efc4d commit 71cf40b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export function AgentsDataGridToolbar(
action,
selectedRowIds,
)
if (success && action === 'SackAgents') {
if (success && action === 'SackAgentsPlayerAction') {
console.log(`props.clearSelectedRows()`)
props.clearSelectedRows()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ export type BatchAgentPlayerActionOption = AgentPlayerActionName | 'None'
export const batchAgentPlayerActionOptionLabel: {
[key in BatchAgentPlayerActionOption]: string
} = {
SendAgentsToIncomeGeneration: 'Send to gen. income',
SendAgentsToIntelGathering: 'Send to gather intel',
SendAgentsToTraining: 'Send to training',
RecallAgents: 'Recall',
SackAgents: 'Sack',
SendAgentsToGenerateIncomePlayerAction: 'Send to gen. income',
SendAgentsToGatherIntelPlayerAction: 'Send to gather intel',
SendAgentsToTrainingPlayerAction: 'Send to training',
RecallAgentsPlayerAction: 'Recall',
SackAgentsPlayerAction: 'Sack',
None: 'None',
}
10 changes: 5 additions & 5 deletions web/src/lib/codesync/ruleset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ export function requiredSurvivingAgentsForSuccess(site: MissionSite): number {
export const agentPlayerActionConditionMap: {
[action in AgentPlayerActionName]: (agent: Agent) => boolean
} = {
SendAgentsToIncomeGeneration: canBeSentOnMission,
SendAgentsToIntelGathering: canBeSentOnMission,
SendAgentsToTraining: canBeSentToTraining,
RecallAgents: canBeRecalled,
SackAgents: canBeSacked,
SendAgentsToGenerateIncomePlayerAction: canBeSentOnMission,
SendAgentsToGatherIntelPlayerAction: canBeSentOnMission,
SendAgentsToTrainingPlayerAction: canBeSentToTraining,
RecallAgentsPlayerAction: canBeRecalled,
SackAgentsPlayerAction: canBeSacked,
}

type EstimatableAssets = Pick<Assets, 'Money' | 'Intel'>
Expand Down

0 comments on commit 71cf40b

Please sign in to comment.