removed unnecessary task/subtask type field
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user