From d44537076c18d8ecd0f1affe5276a0b7f339a350 Mon Sep 17 00:00:00 2001 From: Thaum Rystra <9525416+ThaumRystra@users.noreply.github.com> Date: Tue, 21 Nov 2023 15:38:24 +0200 Subject: [PATCH] removed unnecessary task/subtask type field --- app/imports/api/engine/actions/Actions.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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