mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-23 23:58:02 -05:00
Improved solidity of victory modal. Fixed error with empty sound groups in Thang editor.
This commit is contained in:
parent
149848c971
commit
8640369b26
5 changed files with 10 additions and 3 deletions
|
@ -108,7 +108,7 @@ class AudioPlayer extends CocoClass
|
|||
# TODO: load Interface sounds somehow, somewhere, somewhen
|
||||
|
||||
preloadSoundReference: (sound) ->
|
||||
name = @nameForSoundReference sound
|
||||
return unless name = @nameForSoundReference sound
|
||||
filename = '/file/' + name
|
||||
@preloadSound filename, name
|
||||
filename
|
||||
|
|
|
@ -90,7 +90,7 @@ module.exports = CocoSprite = class CocoSprite extends CocoClass
|
|||
|
||||
setUpSprite: ->
|
||||
for trigger, sounds of @thangType.get('soundTriggers') or {} when trigger isnt 'say'
|
||||
AudioPlayer.preloadSoundReference sound for sound in sounds
|
||||
AudioPlayer.preloadSoundReference sound for sound in sounds when sound
|
||||
if @thangType.get('raster')
|
||||
@stillLoading = false
|
||||
@actions = {}
|
||||
|
|
|
@ -68,6 +68,7 @@ module.exports = class World
|
|||
|
||||
setThang: (thang) ->
|
||||
for old, i in @thangs
|
||||
console.error 'world trying to set', thang, 'over', old unless old? and thang?
|
||||
if old.id is thang.id
|
||||
@thangs[i] = thang
|
||||
@thangMap[thang.id] = thang
|
||||
|
|
|
@ -17,7 +17,10 @@ block modal-footer-content
|
|||
a.btn.btn-primary(href="/play/ladder/#{level.get('slug')}#my-matches", data-dismiss="modal", data-i18n="play_level.victory_go_ladder") Return to Ladder
|
||||
else if hasNextLevel
|
||||
button.btn.btn-success.next-level-button(data-dismiss="modal", data-i18n="play_level.victory_play_next_level") Play Next Level
|
||||
a.btn.btn-primary(href="/play-hero", data-dismiss="modal", data-i18n="play_level.victory_go_home") Go Home
|
||||
else if level.get('type', true) === 'hero'
|
||||
a.btn.btn-success(href="/play-hero", data-dismiss="modal", data-i18n="play_level.victory_play_next_level") Play Next Level
|
||||
else
|
||||
a.btn.btn-primary(href="/", data-dismiss="modal", data-i18n="play_level.victory_go_home") Go Home
|
||||
if me.get('anonymous')
|
||||
p.sign-up-poke
|
||||
button.btn.btn-success.sign-up-button.btn-large(data-toggle="coco-modal", data-target="modal/SignupModal", data-i18n="play_level.victory_sign_up") Sign Up to Save Progress
|
||||
|
|
|
@ -34,6 +34,9 @@ module.exports = class VictoryModal extends ModalView
|
|||
@session = options.session
|
||||
@saveReviewEventually = _.debounce(@saveReviewEventually, 2000)
|
||||
@loadExistingFeedback()
|
||||
if @level.get('type', true) is 'hero'
|
||||
@closeButton = false
|
||||
@closesOnClickOutside = false
|
||||
super options
|
||||
|
||||
loadExistingFeedback: ->
|
||||
|
|
Loading…
Reference in a new issue