Refactor ModVersion into Mod and ModVersion

* Remove V1 of the mod version parser and shift V2 up to be V1
* Add a parser for mod.cg files, and refactor the the mod-version.cg
  files to push the appropriate content up to the mod.cg
* Remove the concept of "silent" from BaseModel along with logging
  each event as they are fired (which is what really prompted the
  need for it in the first place)
* Move use of the Storage class to be completely the province of the
  controllers most closely related to models affected
* Convert the ModVersionController to the ModController and have it
  take on responsibility for choosing the mod version
* Update BaseModel to support simple accessors for the current state
* Update CraftingPlan to be able to remove uncraftable items
* Implement the Mod model
This commit is contained in:
Andrew Miner
2015-01-18 10:48:12 -08:00
parent 76dc863372
commit d1621bb9f6
39 changed files with 922 additions and 1176 deletions
+2 -2
View File
@@ -135,9 +135,9 @@ describe 'Inventory', ->
expect(-> inventory.remove('wool', 10)).to.throw Error,
'cannot remove 10: only 4 wool in this inventory'
it 'removes a single item by default', ->
it 'removes all items by default', ->
inventory.remove 'wool'
inventory._stacks.wool.quantity.should.equal 3
expect(inventory._stacks.wool).to.be.empty
it 'removes a quantity above 1', ->
inventory.remove 'wool', 3