Implementing persisting action result mutations
This commit is contained in:
@@ -17,14 +17,16 @@ export default async function applyTask(
|
||||
action: EngineAction, task: PropTask | ItemAsAmmoTask, inputProvider: InputProvider
|
||||
): Promise<void>
|
||||
|
||||
export default async function applyTask(
|
||||
action: EngineAction, task: Task, inputProvider: InputProvider
|
||||
): Promise<void | number>
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user