| 74 | state.heroHealth = health |
| 75 | }, |
| 76 | addTutorialStep (state, step) { |
| 77 | if (state.tutorial.find(s => // There is a function property that needs to be omitted because they don't compare |
| 78 | _.isEqual(_.omit(step, _.functions(step)), _.omit(s, _.functions(s))))) { |
| 79 | return |
| 80 | } |
| 81 | |
| 82 | if (step.intro) { |
| 83 | state.tutorial = [step, ...Array.from(state.tutorial)] |
| 84 | } else { |
| 85 | state.tutorial.push(step) |
| 86 | } |
| 87 | }, |
| 88 | resetTutorial (state, options) { |
| 89 | if (options == null) { options = {} } |
| 90 | state.tutorialActive = false |