removed unnecessary task/subtask type field

This commit is contained in:
Thaum Rystra
2023-11-21 15:38:24 +02:00
parent 3a67752b1f
commit d44537076c

View File

@@ -36,12 +36,11 @@ interface BaseTask {
interface PropTask extends BaseTask { interface PropTask extends BaseTask {
step?: number, step?: number,
type?: undefined, subtaskFn?: undefined,
} }
interface DamagePropTask extends BaseTask { interface DamagePropTask extends BaseTask {
subtaskFn: 'damageProp'; subtaskFn: 'damageProp';
type: 'subtask';
params: { params: {
/** /**
* Use getPropertyTitle(prop) to set the title * Use getPropertyTitle(prop) to set the title
@@ -313,7 +312,7 @@ async function applyNextTask(action: Action, userInput?) {
let result: PartialTaskResult; let result: PartialTaskResult;
if (task.type === 'subtask') { if (task.subtaskFn) {
result = await applySubtask[task.subtaskFn](task, action); result = await applySubtask[task.subtaskFn](task, action);
} else { } else {
// Get property // Get property