mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-31 07:12:49 -04:00
Intermediate query state for heroes while still transitioning from Unit to Hero.
This commit is contained in:
parent
98fe639010
commit
ea349cfa29
4 changed files with 5 additions and 4 deletions
app/views
server/levels/thangs
|
@ -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})
|
||||
|
|
|
@ -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 = {}
|
||||
|
||||
|
|
|
@ -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: ->
|
||||
|
|
|
@ -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}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue