Silenced annoying Simlish for announced actions until we can get shorter, more legit audio in there.

This commit is contained in:
Nick Winter 2014-11-09 19:45:38 -08:00
parent 9b074841d6
commit 9104d202c0

View file

@ -680,6 +680,12 @@ module.exports = Lank = class Lank extends CocoClass
@lastGold = gold
Backbone.Mediator.publish 'surface:gold-changed', {team: @thang.team, gold: gold, goldEarned: Math.floor(@thang.goldEarned ? 0)}
shouldMuteMessage: (m) ->
return true if m in ['moveRight', 'moveUp', 'moveDown', 'moveLeft']
return true if /^attack /.test m
return true if /^Repeating loop/.test m
false
playSounds: (withDelay=true, volume=1.0) ->
for event in @thang.currentEvents ? []
@playSound event, withDelay, volume
@ -687,7 +693,7 @@ module.exports = Lank = class Lank extends CocoClass
AudioPlayer.playInterfaceSound 'coin_1', 0.25
if @thang.actionActivated and (action = @thang.getActionName()) isnt 'say'
@playSound action, withDelay, volume
if @thang.sayMessage and withDelay and not @thang.silent # don't play sayMessages while scrubbing, annoying
if @thang.sayMessage and withDelay and not @thang.silent and not @shouldMuteMessage @thang.sayMessage # don't play sayMessages while scrubbing, annoying
offsetFrames = Math.abs(@thang.sayStartTime - @thang.world.age) / @thang.world.dt
if offsetFrames <= 2 # or (not withDelay and offsetFrames < 30)
sound = AudioPlayer.soundForDialogue @thang.sayMessage, @thangType.get 'soundTriggers'