Working on some logging for a ladder load issue

This commit is contained in:
Nick Winter 2016-09-15 22:29:36 -07:00
parent c67f1cddda
commit ea7b94bba1
2 changed files with 5 additions and 3 deletions

View file

@ -12,7 +12,7 @@ app = require 'core/application'
World = require 'lib/world/world'
utils = require 'core/utils'
LOG = false
LOG = me.get('name') is 'Shanakin' # Debugging a hanging load issue in production
# This is an initial stab at unifying loading and setup into a single place which can
# monitor everything and keep a LoadingScreen visible overall progress.
@ -381,6 +381,8 @@ module.exports = class LevelLoader extends CocoClass
onWorldNecessitiesLoaded: ->
console.log "World necessities loaded." if LOG
return if @initialized
@initialized = true
@initWorld()
@supermodel.clearMaxProgress()
@trigger 'world-necessities-loaded'
@ -508,8 +510,6 @@ module.exports = class LevelLoader extends CocoClass
# World init
initWorld: ->
return if @initialized
@initialized = true
return if @level.isType('web-dev')
@world = new World()
@world.levelSessionIDs = if @opponentSessionID then [@sessionID, @opponentSessionID] else [@sessionID]

View file

@ -137,8 +137,10 @@ module.exports = class TomeView extends CocoView
null
onSpellLoaded: (e) ->
console.log 'onSpellLoaded', e if me.get('name') is 'Shanakin'
for spellID, spell of @spells
return unless spell.loaded
console.log '... all loaded, let us begin' if me.get('name') is 'Shanakin'
justBegin = @options.level.isType('game-dev')
@cast false, false, justBegin