Intermediate query state for heroes while still transitioning from Unit to Hero.

This commit is contained in:
Nick Winter 2014-10-29 15:54:51 -07:00
parent 98fe639010
commit ea349cfa29
4 changed files with 5 additions and 4 deletions

View file

@ -15,6 +15,7 @@ CocoCollection = require 'collections/CocoCollection'
LC = (componentName, config) -> original: LevelComponent[componentName + 'ID'], majorVersion: 0, config: config
DEFAULT_COMPONENTS =
Unit: [LC('Equips')]
Hero: [LC('Equips')]
Floor: [
LC('Exists', stateless: true)
LC('Physical', width: 20, height: 17, depth: 2, shape: 'sheet', pos: {x: 10, y: 8.5, z: 1})

View file

@ -23,7 +23,7 @@ module.exports = class ChooseHeroView extends CocoView
constructor: (options) ->
super options
@heroes = new CocoCollection([], {model: ThangType})
@heroes.url = '/db/thang.type?view=heroes&project=original,name,slug,soundTriggers,featureImage'
@heroes.url = '/db/thang.type?view=heroes&project=original,name,slug,soundTriggers,featureImage,gems,heroClass,description'
@supermodel.loadCollection(@heroes, 'heroes')
@stages = {}

View file

@ -32,7 +32,7 @@ module.exports = class InventoryView extends CocoView
@equipment = options.equipment or @options.session?.get('heroConfig')?.inventory or me.get('heroConfig')?.inventory or {}
@equipment = $.extend true, {}, @equipment
@requireLevelEquipment()
@items.url = '/db/thang.type?view=items&project=name,components,original,rasterIcon'
@items.url = '/db/thang.type?view=items&project=name,components,original,rasterIcon,gems,description,heroClass'
@supermodel.loadCollection(@items, 'items')
destroy: ->

View file

@ -61,8 +61,8 @@ ThangTypeHandler = class ThangTypeHandler extends Handler
if req.query.view is 'items'
query.kind = 'Item'
else if req.query.view is 'heroes'
query.kind = 'Unit'
query.original = {$in: _.values heroes} # TODO: replace with some sort of ThangType property later
#query.kind = 'Hero' # TODO: when all the heroes are tagged, just use this
query.original = {$in: _.values heroes} # TODO: when all the heroes are tagged, don't do this
else if req.query.view is 'i18n-coverage'
query.i18nCoverage = {$exists: true}