mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-23 15:48:11 -05:00
Fixed #1262.
This commit is contained in:
parent
3f6c9c4f02
commit
b918f5adfb
3 changed files with 35 additions and 79 deletions
|
@ -139,7 +139,7 @@ module.exports = class Level extends CocoModel
|
||||||
for component in thang.components or []
|
for component in thang.components or []
|
||||||
continue unless lc = _.find levelComponents, {original: component.original}
|
continue unless lc = _.find levelComponents, {original: component.original}
|
||||||
component.config ?= {}
|
component.config ?= {}
|
||||||
TreemaNode.utils.populateDefaults(component.config, lc.configSchema)
|
TreemaUtils.populateDefaults(component.config, lc.configSchema)
|
||||||
@lastType = 'component'
|
@lastType = 'component'
|
||||||
@lastOriginal = component.original
|
@lastOriginal = component.original
|
||||||
@walkDefaults component.config, lc.configSchema.properties
|
@walkDefaults component.config, lc.configSchema.properties
|
||||||
|
@ -147,7 +147,7 @@ module.exports = class Level extends CocoModel
|
||||||
fillInDefaultSystemConfiguration: (levelSystems) ->
|
fillInDefaultSystemConfiguration: (levelSystems) ->
|
||||||
for system in levelSystems ? []
|
for system in levelSystems ? []
|
||||||
system.config ?= {}
|
system.config ?= {}
|
||||||
TreemaNode.utils.populateDefaults(system.config, system.model.configSchema)
|
TreemaUtils.populateDefaults(system.config, system.model.configSchema)
|
||||||
@lastType = 'system'
|
@lastType = 'system'
|
||||||
@lastOriginal = system.model.name
|
@lastOriginal = system.model.name
|
||||||
@walkDefaults system.config, system.model.configSchema.properties
|
@walkDefaults system.config, system.model.configSchema.properties
|
||||||
|
@ -165,7 +165,7 @@ module.exports = class Level extends CocoModel
|
||||||
else if schema.type is 'array' and config[prop]
|
else if schema.type is 'array' and config[prop]
|
||||||
for item in config[prop] or []
|
for item in config[prop] or []
|
||||||
@walkDefaults item, schema.items
|
@walkDefaults item, schema.items
|
||||||
|
|
||||||
dimensions: ->
|
dimensions: ->
|
||||||
width = 0
|
width = 0
|
||||||
height = 0
|
height = 0
|
||||||
|
|
|
@ -42,6 +42,7 @@ Worker::removeEventListener = (what) ->
|
||||||
if what is 'message'
|
if what is 'message'
|
||||||
@onmessage = -> #This webworker api has only one event listener at a time.
|
@onmessage = -> #This webworker api has only one event listener at a time.
|
||||||
GLOBAL.tv4 = require('tv4').tv4
|
GLOBAL.tv4 = require('tv4').tv4
|
||||||
|
GLOBAL.TreemaUtils = require './bower_components/treema/treema-utils.js'
|
||||||
GLOBAL.marked = setOptions: ->
|
GLOBAL.marked = setOptions: ->
|
||||||
store = {}
|
store = {}
|
||||||
GLOBAL.localStorage =
|
GLOBAL.localStorage =
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue