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:
Andrew Miner
2015-01-13 09:44:13 -08:00
parent 47c7cf693a
commit 823df84924
10 changed files with 397 additions and 397 deletions
-6
View File
@@ -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 ###############################################################################