mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-26 05:53:39 -04:00
Silenced annoying Simlish for announced actions until we can get shorter, more legit audio in there.
This commit is contained in:
parent
9b074841d6
commit
9104d202c0
1 changed files with 7 additions and 1 deletions
|
@ -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'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue