diff --git a/src/scripts/models/crafting_plan.coffee b/src/scripts/models/crafting_plan.coffee index 190f1d3ef..bde0df73a 100644 --- a/src/scripts/models/crafting_plan.coffee +++ b/src/scripts/models/crafting_plan.coffee @@ -16,7 +16,6 @@ module.exports = class CraftingPlan extends BaseModel options.storage ?= window.localStorage if not attributes.modPack then throw new Error 'modPack is required' - attributes.includingTools ?= options.storage.getItem('includingTools') attributes.includingTools ?= false super attributes, options @@ -29,6 +28,9 @@ module.exports = class CraftingPlan extends BaseModel @have.on 'change', => @craft() @want.on 'change', => @craft() @modPack.on 'change', => @craft() + + value = options.storage.getItem('includingTools') + if value? then @includingTools = value is 'true' @on 'change:includingTools', => @onIncludingToolsChanged() @clear()