MCPcopy Create free account
hub / github.com/codecombat/codecombat / addTutorialStep

Function addTutorialStep

app/core/store/modules/game.js:76–87  ·  view source on GitHub ↗
(state, step)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

dispatchFunction · 0.85
cloneMethod · 0.45

Tested by

no test coverage detected