Fixed #939.
This commit is contained in:
parent
04d74fb76f
commit
2f174691c5
2 changed files with 15 additions and 13 deletions
app/lib
|
@ -94,6 +94,7 @@ module.exports = class LevelLoader extends CocoClass
|
|||
for indieSprite in indieSprites
|
||||
thangIDs.push indieSprite.thangType
|
||||
|
||||
unless @headless
|
||||
for article in @level.get('documentation')?.generalArticles or []
|
||||
articleVersions.push _.pick(article, ['original', 'majorVersion'])
|
||||
|
||||
|
@ -117,6 +118,7 @@ module.exports = class LevelLoader extends CocoClass
|
|||
url = "/db/level/#{obj.original}/version/#{obj.majorVersion}"
|
||||
@maybeLoadURL url, Level, 'level'
|
||||
|
||||
unless @headless
|
||||
wizard = ThangType.loadUniversalWizard()
|
||||
@supermodel.loadModel wizard, 'thang'
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ module.exports = class Simulator extends CocoClass
|
|||
@god = new God maxWorkerPoolSize: 1, maxAngels: 1 # Start loading worker.
|
||||
|
||||
@levelLoader = new LevelLoader supermodel: @supermodel, levelID: levelID, sessionID: @task.getFirstSessionID(), headless: true
|
||||
@listenToOnce(@levelLoader, 'loaded-all', @simulateGame)
|
||||
@listenToOnce(@supermodel, 'loaded-all', @simulateGame)
|
||||
|
||||
simulateGame: ->
|
||||
return if @destroyed
|
||||
|
|
Reference in a new issue