Display images for each item referenced

This commit is contained in:
Andrew Miner
2015-01-04 01:01:00 -08:00
parent fc97854718
commit 150e85bb49
14 changed files with 147 additions and 34 deletions
+3 -1
View File
@@ -17,9 +17,10 @@ module.exports = class ModVersion extends BaseModel
if _.isEmpty(attributes.version) then throw new Error 'version cannot be empty'
attributes.description ?= ''
attributes.items ?= {}
attributes.enabled ?= attributes.name in RequiredMods
attributes.items ?= {}
attributes.names ?= {}
attributes.slug ?= _.slugify attributes.name
super attributes, options
# Public Methods ###############################################################################
@@ -27,6 +28,7 @@ module.exports = class ModVersion extends BaseModel
addItem: (item)->
if @items[item.slug]? then throw new Error "duplicate item for #{item.slug}"
@items[item.slug] = item
item.modVersion = this
return this
compareTo: (that)->