From aa0bf64642c915dd4b7243eb05e04886116ef4a5 Mon Sep 17 00:00:00 2001 From: Brunon Blok <43315279+brun0ne@users.noreply.github.com> Date: Fri, 7 Apr 2023 18:48:42 +0000 Subject: [PATCH] fix step for disabled operations and comments --- src/core/Recipe.mjs | 2 +- src/web/App.mjs | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/core/Recipe.mjs b/src/core/Recipe.mjs index 3ce40aa4..1b3de678 100755 --- a/src/core/Recipe.mjs +++ b/src/core/Recipe.mjs @@ -46,7 +46,7 @@ class Recipe { module: OperationConfig[c.op].module, ingValues: c.args, breakpoint: c.breakpoint, - disabled: c.disabled || c.op === "Comment", + disabled: c.disabled, }); }); } diff --git a/src/web/App.mjs b/src/web/App.mjs index cce91b1e..198deaea 100755 --- a/src/web/App.mjs +++ b/src/web/App.mjs @@ -140,6 +140,13 @@ class App { // Remove all current indicators this.manager.recipe.updateBreakpointIndicator(false); + if (this.getRecipeConfig()[this.progress] && (this.getRecipeConfig()[this.progress].disabled || this.getRecipeConfig()[this.progress].op === "Comment")) { + // Skip disabled operations and comments + // This makes stepping through the recipe work correctly + this.progress++; + return this.bake(step); + } + this.manager.worker.bake( this.getRecipeConfig(), // The configuration of the recipe this.options, // Options set by the user