mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-28 01:55:38 -05:00
Fixed a bug with the simulator due to the changes made to the supermodel.
This commit is contained in:
parent
0be813e424
commit
09fbfdb360
2 changed files with 2 additions and 1 deletions
|
@ -74,7 +74,7 @@ module.exports = class Simulator extends CocoClass
|
||||||
return
|
return
|
||||||
|
|
||||||
@supermodel ?= new SuperModel()
|
@supermodel ?= new SuperModel()
|
||||||
|
@supermodel.resetProgress()
|
||||||
@levelLoader = new LevelLoader supermodel: @supermodel, levelID: levelID, sessionID: @task.getFirstSessionID(), headless: true
|
@levelLoader = new LevelLoader supermodel: @supermodel, levelID: levelID, sessionID: @task.getFirstSessionID(), headless: true
|
||||||
if @supermodel.finished()
|
if @supermodel.finished()
|
||||||
@simulateGame()
|
@simulateGame()
|
||||||
|
|
|
@ -162,6 +162,7 @@ module.exports = class SuperModel extends Backbone.Model
|
||||||
@trigger('loaded-all') if @finished()
|
@trigger('loaded-all') if @finished()
|
||||||
|
|
||||||
setMaxProgress: (@maxProgress) ->
|
setMaxProgress: (@maxProgress) ->
|
||||||
|
resetProgress: -> @progress = 0
|
||||||
clearMaxProgress: ->
|
clearMaxProgress: ->
|
||||||
@maxProgress = 1
|
@maxProgress = 1
|
||||||
_.defer @updateProgress
|
_.defer @updateProgress
|
||||||
|
|
Loading…
Reference in a new issue