diff --git a/app/imports/api/engine/actions/Actions.ts b/app/imports/api/engine/actions/Actions.ts index 205e7364..a06b6a6e 100644 --- a/app/imports/api/engine/actions/Actions.ts +++ b/app/imports/api/engine/actions/Actions.ts @@ -36,12 +36,11 @@ interface BaseTask { interface PropTask extends BaseTask { step?: number, - type?: undefined, + subtaskFn?: undefined, } interface DamagePropTask extends BaseTask { subtaskFn: 'damageProp'; - type: 'subtask'; params: { /** * Use getPropertyTitle(prop) to set the title @@ -313,7 +312,7 @@ async function applyNextTask(action: Action, userInput?) { let result: PartialTaskResult; - if (task.type === 'subtask') { + if (task.subtaskFn) { result = await applySubtask[task.subtaskFn](task, action); } else { // Get property