mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-01 07:40:22 -04:00
Fixed the goal manager from polluting the goals in the level with the isPositive property.
This commit is contained in:
parent
ad0590f9ba
commit
b8051689b3
1 changed files with 1 additions and 0 deletions
|
@ -90,6 +90,7 @@ module.exports = class GoalManager extends CocoClass
|
|||
# IMPLEMENTATION DETAILS
|
||||
|
||||
addGoal: (goal) ->
|
||||
goal = _.cloneDeep(goal)
|
||||
goal.id = @nextGoalID++ if not goal.id
|
||||
return if @goalStates[goal.id]?
|
||||
@goals.push(goal)
|
||||
|
|
Loading…
Add table
Reference in a new issue