mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-23 23:58:02 -05:00
Fix adding inventory items to hero in level editor
Was only happening when HeroPlaceholder had HasPet component. Presumably because the collection was loaded by HasPet, but the thang node for the inventory node needed to populate its autocomplete array.
This commit is contained in:
parent
53a7510c46
commit
be78f4049c
2 changed files with 5 additions and 2 deletions
|
@ -119,4 +119,4 @@ class SolutionsNode extends TreemaArrayNode
|
|||
succeeds: true
|
||||
})
|
||||
|
||||
@set('/', solutions)
|
||||
@set('/', solutions)
|
||||
|
|
|
@ -260,7 +260,10 @@ module.exports.ThangTypeNode = ThangTypeNode = class ThangTypeNode extends Treem
|
|||
thangType?.name or '...'
|
||||
|
||||
getThangTypes: ->
|
||||
return if ThangTypeNode.thangTypesCollection
|
||||
if ThangTypeNode.thangTypesCollection
|
||||
if not @constructor.thangTypes
|
||||
@processThangTypes(ThangTypeNode.thangTypesCollection)
|
||||
return
|
||||
ThangTypeNode.thangTypesCollection = new CocoCollection([], {
|
||||
url: '/db/thang.type'
|
||||
project:['name', 'components', 'original']
|
||||
|
|
Loading…
Reference in a new issue