Complete refactoring to move Recipes into Items

* Changed "version" to "dataVersion" in data format
* Changed the "modName" and "modVersion" fields on the ModVersion
  class to remove the "mod" prefix and changed the data format to
  match
* Change the Stack class to use the itemSlug instead of the item
  itself
* Update the ModVersion and ModPack classes to include methods for
  recording a correspondence between slugs and names. Update code
  which displays items from stacks to use these methods to determine
  display names.
* Add a reference from Recipe back to the item it creates
This commit is contained in:
Andrew Miner
2015-01-03 20:08:11 -08:00
parent 392c410df8
commit 0d25ac723d
24 changed files with 260 additions and 285 deletions
+3 -3
View File
@@ -18,15 +18,15 @@ buildcraft = industrialCraft = minecraft = modPack = null
describe 'ModPack', ->
beforeEach ->
minecraft = new ModVersion modName:'Minecraft', modVersion:'1.7.10'
minecraft = new ModVersion name:'Minecraft', version:'1.7.10'
minecraft.addItem new Item name:'Wool'
minecraft.addItem new Item name:'Bed', recipes:['']
buildcraft = new ModVersion modName:'Buildcraft', modVersion:'4.0'
buildcraft = new ModVersion name:'Buildcraft', version:'4.0'
buildcraft.addItem new Item name:'Stone Gear', recipes:['']
buildcraft.addItem new Item name:'Bed', recipes:['']
industrialCraft = new ModVersion modName:'Industrial Craft', modVersion:'2.0'
industrialCraft = new ModVersion name:'Industrial Craft', version:'2.0'
industrialCraft.addItem new Item name:'Resin'
industrialCraft.addItem new Item name:'Rubber', recipes:['']