Made it so that high scores and level victories are not achieved when playing changed levels from inside the level editor. Some additions for Nalfar.
This commit is contained in:
parent
3f23598c60
commit
0d99b07bc3
4 changed files with 5 additions and 2 deletions
app
models
views/play
|
@ -24,7 +24,7 @@ module.exports = class ThangType extends CocoModel
|
||||||
librarian: '52fbf74b7e01835453bd8d8e'
|
librarian: '52fbf74b7e01835453bd8d8e'
|
||||||
'potion-master': '52e9adf7427172ae56002172'
|
'potion-master': '52e9adf7427172ae56002172'
|
||||||
sorcerer: '52fd1524c7e6cf99160e7bc9'
|
sorcerer: '52fd1524c7e6cf99160e7bc9'
|
||||||
necromancer: ''
|
necromancer: '55652fb3b9effa46a1f775fd'
|
||||||
'dark-wizard': ''
|
'dark-wizard': ''
|
||||||
@heroClasses:
|
@heroClasses:
|
||||||
Warrior: ['captain', 'knight', 'samurai', 'raider', 'goliath', 'guardian']
|
Warrior: ['captain', 'knight', 'samurai', 'raider', 'goliath', 'guardian']
|
||||||
|
|
|
@ -439,6 +439,7 @@ module.exports = class PlayLevelView extends RootView
|
||||||
application.tracker?.trackTiming victoryTime, 'Level Victory Time', @levelID, @levelID
|
application.tracker?.trackTiming victoryTime, 'Level Victory Time', @levelID, @levelID
|
||||||
|
|
||||||
showVictory: ->
|
showVictory: ->
|
||||||
|
return if @isEditorPreview and @level.hasLocalChanges() # Don't award achievements when beating level changed in level editor
|
||||||
@endHighlight()
|
@endHighlight()
|
||||||
options = {level: @level, supermodel: @supermodel, session: @session, hasReceivedMemoryWarning: @hasReceivedMemoryWarning}
|
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
|
ModalClass = if @level.get('type', true) in ['hero', 'hero-ladder', 'hero-coop'] then HeroVictoryModal else VictoryModal
|
||||||
|
@ -537,6 +538,7 @@ module.exports = class PlayLevelView extends RootView
|
||||||
|
|
||||||
onSubmissionComplete: =>
|
onSubmissionComplete: =>
|
||||||
return if @destroyed
|
return if @destroyed
|
||||||
|
return if @isEditorPreview and @level.hasLocalChanges() # Don't award achievements when beating level changed in level editor
|
||||||
# TODO: Show a victory dialog specific to hero-ladder level
|
# TODO: Show a victory dialog specific to hero-ladder level
|
||||||
if @goalManager.checkOverallStatus() is 'success' and not @options.realTimeMultiplayerSessionID?
|
if @goalManager.checkOverallStatus() is 'success' and not @options.realTimeMultiplayerSessionID?
|
||||||
showModalFn = -> Backbone.Mediator.publish 'level:show-victory', showModal: true
|
showModalFn = -> Backbone.Mediator.publish 'level:show-victory', showModal: true
|
||||||
|
|
|
@ -72,6 +72,7 @@ module.exports = class CastButtonView extends CocoView
|
||||||
@updateReplayability()
|
@updateReplayability()
|
||||||
|
|
||||||
onDoneButtonClick: (e) ->
|
onDoneButtonClick: (e) ->
|
||||||
|
return if @getQueryVariable('dev') and @level.hasLocalChanges() # Don't award achievements when beating level changed in level editor
|
||||||
@options.session.recordScores @world.scores, @options.level
|
@options.session.recordScores @world.scores, @options.level
|
||||||
Backbone.Mediator.publish 'level:show-victory', showModal: true
|
Backbone.Mediator.publish 'level:show-victory', showModal: true
|
||||||
|
|
||||||
|
|
|
@ -178,7 +178,7 @@ module.exports = class PlayHeroesModal extends ModalView
|
||||||
layer.container.children[0].y = 250/m
|
layer.container.children[0].y = 250/m
|
||||||
if fullHero.get('slug') in ['forest-archer', 'librarian', 'sorcerer', 'potion-master', 'necromancer']
|
if fullHero.get('slug') in ['forest-archer', 'librarian', 'sorcerer', 'potion-master', 'necromancer']
|
||||||
layer.container.children[0].y -= 3
|
layer.container.children[0].y -= 3
|
||||||
if fullHero.get('slug') in ['librarian', 'sorcerer', 'potion-master']
|
if fullHero.get('slug') in ['librarian', 'sorcerer', 'potion-master', 'necromancer']
|
||||||
layer.container.children[0].x -= 3
|
layer.container.children[0].x -= 3
|
||||||
|
|
||||||
stage = new createjs.SpriteStage(canvas[0])
|
stage = new createjs.SpriteStage(canvas[0])
|
||||||
|
|
Reference in a new issue