mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-28 13:50:07 -04:00
Hooked up some of the new voiceover sounds.
This commit is contained in:
parent
f504490a37
commit
50624ca7bb
2 changed files with 12 additions and 4 deletions
app/lib
|
@ -76,6 +76,14 @@ class AudioPlayer extends CocoClass
|
|||
return sound if sound = say[message]
|
||||
if _.string.startsWith message, 'attack'
|
||||
return sound if sound = say.attack
|
||||
if message.indexOf("i-dont-see-anyone") isnt -1
|
||||
return sound if sound = say['i-dont-see-anyone']
|
||||
if message.indexOf("i-see-you") isnt -1
|
||||
return sound if sound = say['i-see-you']
|
||||
if message.indexOf("repeating-loop") isnt -1
|
||||
return sound if sound = say['repeating-loop']
|
||||
if /move(up|down|left|right)/.test message
|
||||
return sound if sound = say["move-#{message[4...]}"]
|
||||
defaults = say.defaultSimlish
|
||||
if say.swearingSimlish?.length and _.find(swears, (s) -> message.search(s) isnt -1)
|
||||
defaults = say.swearingSimlish
|
||||
|
|
|
@ -691,10 +691,10 @@ module.exports = Lank = class Lank extends CocoClass
|
|||
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
|
||||
return true if /^findNearestEnemy/.test m
|
||||
return false if m in ['moveRight', 'moveUp', 'moveDown', 'moveLeft']
|
||||
#return true if /^attack /.test m
|
||||
#return true if /^Repeating loop/.test m
|
||||
#return true if /^findNearestEnemy/.test m
|
||||
@previouslySaidMessages ?= {}
|
||||
t0 = @previouslySaidMessages[m] ? 0
|
||||
t1 = new Date()
|
||||
|
|
Loading…
Add table
Reference in a new issue