mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-02-16 00:19:50 -05:00
Fixed another cause of the bug fixed in 0d99b07b
with modified levels still granting rewards.
This commit is contained in:
parent
aeff90cba9
commit
107f94a08b
2 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue