mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-28 01:55:38 -05:00
Fixed the new build queue system for levels where there are multiple builders for a single thang type.
This commit is contained in:
parent
b2e9768127
commit
abd50b9495
1 changed files with 2 additions and 2 deletions
|
@ -138,7 +138,7 @@ module.exports = class ThangType extends CocoModel
|
|||
key = @spriteSheetKey(@options)
|
||||
spriteSheet = null
|
||||
if @options.async
|
||||
buildQueue.push @
|
||||
buildQueue.push @builder
|
||||
@builder.buildAsync() unless buildQueue.length > 1
|
||||
@builder.on 'complete', @onBuildSpriteSheetComplete, @, true, key
|
||||
return true
|
||||
|
@ -150,7 +150,7 @@ module.exports = class ThangType extends CocoModel
|
|||
|
||||
onBuildSpriteSheetComplete: (e, key) ->
|
||||
buildQueue = buildQueue.slice(1)
|
||||
buildQueue[0]?.builder.buildAsync()
|
||||
buildQueue[0]?.buildAsync()
|
||||
@spriteSheets[key] = e.target.spriteSheet
|
||||
delete @building[key]
|
||||
@trigger 'build-complete'
|
||||
|
|
Loading…
Reference in a new issue