victory and defeat sounds - draw is missing! - #594

pull/659/head
Thibault Duplessis 2015-06-26 23:51:44 +02:00
parent 8bf5f906cc
commit 2e73532939
14 changed files with 8 additions and 2 deletions

View File

@ -1045,7 +1045,9 @@ lichess.storage = {
move: 'Move',
capture: 'Capture',
explode: 'Explosion',
lowtime: 'LowTime'
lowtime: 'LowTime',
victory: 'Victory',
defeat: 'Defeat'
};
var volumes = {
lowtime: 0.5,

View File

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

View File

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

View File

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

View File

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

View File

@ -39,7 +39,7 @@ 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.genericNotify();
if (!ctrl.data.player.spectator) $.sound[ctrl.data.player.color === winner ? 'victory' : 'defeat']();
},
gone: function(isGone) {
if (!ctrl.data.opponent.ai) {