mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 17:45:40 -05:00
Fixed a bug with the new goal view.
This commit is contained in:
parent
341097c5ca
commit
9ad4602e0f
1 changed files with 2 additions and 1 deletions
|
@ -78,8 +78,8 @@ module.exports = class GoalManager extends CocoClass
|
|||
# main instance gets them and updates their existing goal states,
|
||||
# passes the word along
|
||||
onNewWorldCreated: (e) ->
|
||||
@updateGoalStates(e.goalStates) if e.goalStates?
|
||||
@world = e.world
|
||||
@updateGoalStates(e.goalStates) if e.goalStates?
|
||||
|
||||
updateGoalStates: (newGoalStates) ->
|
||||
for goalID, goalState of newGoalStates
|
||||
|
@ -109,6 +109,7 @@ module.exports = class GoalManager extends CocoClass
|
|||
goals: @goals
|
||||
overallStatus: overallStatus
|
||||
timedOut: @world.totalFrames is @world.maxTotalFrames
|
||||
console.log 'timed out', @world.totalFrames is @world.maxTotalFrames, @world.totalFrames, @world.maxTotalFrames, @world.frames.length
|
||||
Backbone.Mediator.publish('goal-manager:new-goal-states', event)
|
||||
|
||||
checkOverallStatus: (ignoreIncomplete=false) ->
|
||||
|
|
Loading…
Reference in a new issue