Fix "player is no longer ." to actually state the last color.
This commit is contained in:
parent
64e454662b
commit
a671adebcb
@ -1170,13 +1170,14 @@ const setPlayerColor = (game, session, color) => {
|
|||||||
/* Deselect currently active player for this session */
|
/* Deselect currently active player for this session */
|
||||||
clearPlayer(session.player);
|
clearPlayer(session.player);
|
||||||
session.player = undefined;
|
session.player = undefined;
|
||||||
|
const old_color = session.color;
|
||||||
session.color = '';
|
session.color = '';
|
||||||
active--;
|
active--;
|
||||||
|
|
||||||
/* If the player is not selecting a color, then return */
|
/* If the player is not selecting a color, then return */
|
||||||
if (!color) {
|
if (!color) {
|
||||||
addChatMessage(game, null,
|
addChatMessage(game, null,
|
||||||
`${session.name} is no longer ${colorToWord(session.color)}.`);
|
`${session.name} is no longer ${colorToWord(old_color)}.`);
|
||||||
game.unselected.push(session);
|
game.unselected.push(session);
|
||||||
game.active = active;
|
game.active = active;
|
||||||
if (active === 1) {
|
if (active === 1) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user