Not trying to play a certain sound we don't have yet.

This commit is contained in:
Nick Winter 2015-09-02 05:32:45 -07:00
parent aa16348ded
commit 6463b04c5c
3 changed files with 6 additions and 2 deletions
app

View file

@ -16,6 +16,8 @@ table.table
block tableBody
for document in documents
- var data = document.attributes;
- if(data.slug == 'ace-of-coders' && new Date() < new Date(1441954800000))
- continue;
tr(class=document.getOwner() == me.id ? 'mine' : '')
td
a(href="/editor/#{page}/#{data.slug || data._id}")

View file

@ -191,6 +191,7 @@ module.exports = class ClanDetailsView extends RootView
name: utils.i18n(campaign.attributes, 'fullName') or utils.i18n(campaign.attributes, 'name')
levels: []
for levelID, level of campaign.get('levels')
continue if level.slug is 'ace-of-coders' and new Date() < new Date(1441954800000)
campaignLevelProgression.levels.push
ID: levelID
slug: level.slug
@ -198,7 +199,7 @@ module.exports = class ClanDetailsView extends RootView
if level.concepts?
for concept in level.concepts
@conceptsProgression.push concept unless concept in @conceptsProgression
if level.type == 'hero-ladder'
if level.type is 'hero-ladder'
@arenas.push level
@campaignLevelProgressions.push campaignLevelProgression
@render?()

View file

@ -286,7 +286,8 @@ module.exports = class LevelPlaybackView extends CocoView
@scrubTo ui.value / @sliderIncrements
if ratioChange = @getScrubRatio() - oldRatio
sound = "playback-scrub-slide-#{if ratioChange > 0 then 'forward' else 'back'}-#{@slideCount % 3}"
Backbone.Mediator.publish 'audio-player:play-sound', trigger: sound, volume: Math.min 1, Math.abs ratioChange * 50
unless /back/.test sound # We don't have the back sounds in yet: http://discourse.codecombat.com/t/bug-some-mp3-lost/4830
Backbone.Mediator.publish 'audio-player:play-sound', trigger: sound, volume: Math.min 1, Math.abs ratioChange * 50
start: (event, ui) =>
return if @shouldIgnore()