mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-28 01:55:38 -05:00
Better error messages for missing Component dependencies.
This commit is contained in:
parent
9e56540cee
commit
03abbc44cb
1 changed files with 2 additions and 1 deletions
|
@ -52,13 +52,14 @@ module.exports = class Level extends CocoModel
|
|||
visit = (c) ->
|
||||
return if c in sorted
|
||||
lc = _.find levelComponents, {original: c.original}
|
||||
console.error "Couldn't find lc for", c unless lc
|
||||
console.error thang.id, "couldn't find lc for", c unless lc
|
||||
if lc.name is "Programmable"
|
||||
# Programmable always comes last
|
||||
visit c2 for c2 in _.without thang.components, c
|
||||
else
|
||||
for d in lc.dependencies or []
|
||||
c2 = _.find thang.components, {original: d.original}
|
||||
console.error thang.id, "couldn't find dependent Component", d.original, "from", lc.name unless c2
|
||||
visit c2
|
||||
if lc.name is "Collides"
|
||||
allied = _.find levelComponents, {name: "Allied"}
|
||||
|
|
Loading…
Reference in a new issue