don't update nomination state from revealed grimoire

This commit is contained in:
nicfreeman1209 2021-05-11 12:45:13 +01:00
parent 078eedbf74
commit ef8aef2d2a
2 changed files with 11 additions and 10 deletions

View file

@ -307,16 +307,17 @@ export default new Vuex.Store({
}
});
if (!isLightweight) {
// properties we always update
this.commit("toggleNight", !!isNight);
this.commit("session/setVoteHistoryAllowed", isVoteHistoryAllowed);
this.commit("session/nomination", {
nomination,
votes,
votingSpeed,
lockedVote,
isVoteInProgress
});
if (nomination !== -1) {
this.commit("session/nomination", {
nomination,
votes,
votingSpeed,
lockedVote,
isVoteInProgress
});
}
this.commit("session/setMarkedPlayer", markedPlayer);
this.commit("players/setFabled", {
fabled: fabled.map(f => state.fabled.get(f.id) || f)

View file

@ -248,7 +248,7 @@ class LiveSession {
}
/**
* Publish the current game state.
* Publish the current game state, as seen by a player
* Optional param isLightweight to reduce traffic (=send only player data)
* Optional param isRevealGrimoire to reveal grimoire (=include ALL player roles, reminders & bluffs)
* @param playerId
@ -294,7 +294,7 @@ class LiveSession {
isRevealedGrimoire: isRevealedGrimoire,
isNight: grimoire.isNight,
isVoteHistoryAllowed: session.isVoteHistoryAllowed,
nomination: session.nomination,
nomination: isRevealedGrimoire ? -1 : session.nomination,
votingSpeed: session.votingSpeed,
lockedVote: session.lockedVote,
isVoteInProgress: session.isVoteInProgress,