add draw sounds - #594

pull/659/head
Thibault Duplessis 2015-06-27 01:29:18 +02:00
parent 060ec4369e
commit e305470763
8 changed files with 5 additions and 1 deletions

View File

@ -1049,6 +1049,7 @@ lichess.storage = {
lowtime: 'LowTime',
victory: 'Victory',
defeat: 'Defeat',
draw: 'Draw',
tournament1st: 'Tournament1st',
tournament2nd: 'Tournament2nd',
tournament3rd: 'Tournament3rd',

View File

@ -0,0 +1 @@
GenericNotify.mp3

View File

@ -0,0 +1 @@
GenericNotify.ogg

View File

@ -39,7 +39,8 @@ module.exports = function(send, ctrl) {
ctrl.data.game.winner = winner;
ground.end(ctrl.chessground);
xhr.reload(ctrl).then(ctrl.reload);
if (!ctrl.data.player.spectator) $.sound[ctrl.data.player.color === winner ? 'victory' : 'defeat']();
if (!ctrl.data.player.spectator)
$.sound[winner ? (ctrl.data.player.color === winner ? 'victory' : 'defeat') : 'draw']();
},
gone: function(isGone) {
if (!ctrl.data.opponent.ai) {