Revert local storage change & refactor parser V1
* Revert the local storage change as it ties model objects to global state and makes testing impossible. It will be necessary to redo that feature differently * Refactor the parser versions to move V1 into its own set of files
This commit is contained in:
@@ -13,8 +13,6 @@ Inventory = require './inventory'
|
||||
module.exports = class CraftingPlan extends BaseModel
|
||||
|
||||
constructor: (attributes={}, options={})->
|
||||
options.storage ?= window.localStorage
|
||||
|
||||
if not attributes.modPack then throw new Error 'modPack is required'
|
||||
attributes.includingTools ?= false
|
||||
super attributes, options
|
||||
@@ -29,10 +27,6 @@ module.exports = class CraftingPlan extends BaseModel
|
||||
@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()
|
||||
|
||||
# Public Methods ###############################################################################
|
||||
|
||||
Reference in New Issue
Block a user