mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 17:45:40 -05:00
Log some stuff for debugging
This commit is contained in:
parent
ecb5169ca7
commit
2dc66f5947
1 changed files with 4 additions and 0 deletions
|
@ -147,6 +147,7 @@ module.exports = class LevelLoader extends CocoClass
|
|||
@listenToOnce @opponentSession, 'sync', @loadDependenciesForSession
|
||||
|
||||
loadDependenciesForSession: (session) ->
|
||||
console.log "Loading dependencies for session: ", session
|
||||
if me.id isnt session.get 'creator'
|
||||
session.patch = session.save = -> console.error "Not saving session, since we didn't create it."
|
||||
else if codeLanguage = utils.getQueryVariable 'codeLanguage'
|
||||
|
@ -171,9 +172,11 @@ module.exports = class LevelLoader extends CocoClass
|
|||
@consolidateFlagHistory() if @session.loaded
|
||||
if @level.get('type', true) in ['course'] # course-ladder is hard to handle because there's 2 sessions
|
||||
heroConfig = me.get('heroConfig')
|
||||
console.log "Course mode, loading custom hero: ", heroConfig
|
||||
return if not heroConfig
|
||||
url = "/db/thang.type/#{heroConfig.thangType}/version"
|
||||
if heroResource = @maybeLoadURL(url, ThangType, 'thang')
|
||||
console.log "Pushing resource: ", heroResource
|
||||
@worldNecessities.push heroResource
|
||||
return
|
||||
return unless @level.get('type', true) in ['hero', 'hero-ladder', 'hero-coop']
|
||||
|
@ -341,6 +344,7 @@ module.exports = class LevelLoader extends CocoClass
|
|||
true
|
||||
|
||||
onWorldNecessitiesLoaded: ->
|
||||
console.log "World necessities loaded."
|
||||
@initWorld()
|
||||
@supermodel.clearMaxProgress()
|
||||
@trigger 'world-necessities-loaded'
|
||||
|
|
Loading…
Reference in a new issue