Jump operations now return the final state when the maximum jump count is reached instead of throwing an error.

This commit is contained in:
n1474335 2017-01-16 16:00:44 +00:00
parent baa433ab80
commit 2257754b94
5 changed files with 22 additions and 20 deletions

View file

@ -128,7 +128,8 @@ var FlowControl = {
max_jumps = ings[1];
if (state.num_jumps >= max_jumps) {
throw "Reached maximum jumps, sorry!";
state.progress++;
return state;
}
state.progress += jump_num;
@ -155,7 +156,8 @@ var FlowControl = {
max_jumps = ings[2];
if (state.num_jumps >= max_jumps) {
throw "Reached maximum jumps, sorry!";
state.progress++;
return state;
}
if (regex_str !== "" && dish.get(Dish.STRING).search(regex_str) > -1) {