Fixed another cause of the bug fixed in 0d99b07b with modified levels still granting rewards.

This commit is contained in:
Nick Winter 2015-07-24 08:56:20 -07:00
parent aeff90cba9
commit 107f94a08b
2 changed files with 3 additions and 3 deletions

View file

@ -439,7 +439,7 @@ module.exports = class PlayLevelView extends RootView
application.tracker?.trackTiming victoryTime, 'Level Victory Time', @levelID, @levelID
showVictory: ->
return if @isEditorPreview and @level.hasLocalChanges() # Don't award achievements when beating level changed in level editor
return if @level.hasLocalChanges() # Don't award achievements when beating level changed in level editor
@endHighlight()
options = {level: @level, supermodel: @supermodel, session: @session, hasReceivedMemoryWarning: @hasReceivedMemoryWarning}
ModalClass = if @level.get('type', true) in ['hero', 'hero-ladder', 'hero-coop'] then HeroVictoryModal else VictoryModal
@ -538,7 +538,7 @@ module.exports = class PlayLevelView extends RootView
onSubmissionComplete: =>
return if @destroyed
return if @isEditorPreview and @level.hasLocalChanges() # Don't award achievements when beating level changed in level editor
return if @level.hasLocalChanges() # Don't award achievements when beating level changed in level editor
# TODO: Show a victory dialog specific to hero-ladder level
if @goalManager.checkOverallStatus() is 'success' and not @options.realTimeMultiplayerSessionID?
showModalFn = -> Backbone.Mediator.publish 'level:show-victory', showModal: true

View file

@ -72,7 +72,7 @@ module.exports = class CastButtonView extends CocoView
@updateReplayability()
onDoneButtonClick: (e) ->
return if @getQueryVariable('dev') and @level.hasLocalChanges() # Don't award achievements when beating level changed in level editor
return if @level.hasLocalChanges() # Don't award achievements when beating level changed in level editor
@options.session.recordScores @world.scores, @options.level
Backbone.Mediator.publish 'level:show-victory', showModal: true