added 'invisible' code again

This commit is contained in:
Sylvain Gay 2022-09-15 09:45:42 +02:00
parent 64bd22ed5a
commit 094f2419ec

View file

@ -20,6 +20,7 @@ Les messages à transmettre par le serveur :
// Textes d'interaction avec les conscrits
var PWD_TRACKED = "tracked";
var PWD_TRACKER = "tracker";
var PWD_INVISIBLE = "invisible";
var MSG_BAD = "Code Incorrect";
var MSG_TRACKED = "Vous êtes maintenant traqué.e.s !"
var MSG_TRACKER = "Vous pouvez maintenant traquer !";
@ -119,8 +120,10 @@ io.sockets.on('connection', function(socket){
} else if(d.content == PWD_TRACKER){
d.color = 1;
socket.emit('popup', {"content": MSG_TRACKER});
}
else if((d.content in invisi) && invisi[d.content]){
} else if(d.content == PWD_INVISIBLE){
d.color = -1;
socket.emit('popup', {"content": MSG_INVISIBLE});
} else if((d.content in invisi) && invisi[d.content]){
invisi[d.content] = false;
old_color = socket.color;
d.color = -1;