Action interruption progress
This commit is contained in:
@@ -20,6 +20,15 @@ export default async function applyTask(
|
||||
export default async function applyTask(
|
||||
action: EngineAction, task: Task, inputProvider: InputProvider
|
||||
): Promise<void | number> {
|
||||
|
||||
// Pause and wait for the user if the action is being stepped through
|
||||
console.log('applying task', action, inputProvider)
|
||||
if (action._isSimulation && action._stepThrough && inputProvider.nextStep) {
|
||||
console.log('waiting for next step resolution', task)
|
||||
await inputProvider.nextStep(task);
|
||||
}
|
||||
|
||||
// Ensure no more than 100 tasks are performed by a single action
|
||||
action.taskCount += 1;
|
||||
if (action.taskCount > 100) throw 'Only 100 properties can be applied at once';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user