mirror of
https://github.com/bra1n/townsquare.git
synced 2025-04-04 22:24:36 +00:00
don't update nomination state from revealed grimoire
This commit is contained in:
parent
078eedbf74
commit
ef8aef2d2a
2 changed files with 11 additions and 10 deletions
|
@ -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)
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue