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) {
|
if (!isLightweight) {
|
||||||
// properties we always update
|
|
||||||
this.commit("toggleNight", !!isNight);
|
this.commit("toggleNight", !!isNight);
|
||||||
this.commit("session/setVoteHistoryAllowed", isVoteHistoryAllowed);
|
this.commit("session/setVoteHistoryAllowed", isVoteHistoryAllowed);
|
||||||
this.commit("session/nomination", {
|
if (nomination !== -1) {
|
||||||
nomination,
|
this.commit("session/nomination", {
|
||||||
votes,
|
nomination,
|
||||||
votingSpeed,
|
votes,
|
||||||
lockedVote,
|
votingSpeed,
|
||||||
isVoteInProgress
|
lockedVote,
|
||||||
});
|
isVoteInProgress
|
||||||
|
});
|
||||||
|
}
|
||||||
this.commit("session/setMarkedPlayer", markedPlayer);
|
this.commit("session/setMarkedPlayer", markedPlayer);
|
||||||
this.commit("players/setFabled", {
|
this.commit("players/setFabled", {
|
||||||
fabled: fabled.map(f => state.fabled.get(f.id) || f)
|
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 isLightweight to reduce traffic (=send only player data)
|
||||||
* Optional param isRevealGrimoire to reveal grimoire (=include ALL player roles, reminders & bluffs)
|
* Optional param isRevealGrimoire to reveal grimoire (=include ALL player roles, reminders & bluffs)
|
||||||
* @param playerId
|
* @param playerId
|
||||||
|
@ -294,7 +294,7 @@ class LiveSession {
|
||||||
isRevealedGrimoire: isRevealedGrimoire,
|
isRevealedGrimoire: isRevealedGrimoire,
|
||||||
isNight: grimoire.isNight,
|
isNight: grimoire.isNight,
|
||||||
isVoteHistoryAllowed: session.isVoteHistoryAllowed,
|
isVoteHistoryAllowed: session.isVoteHistoryAllowed,
|
||||||
nomination: session.nomination,
|
nomination: isRevealedGrimoire ? -1 : session.nomination,
|
||||||
votingSpeed: session.votingSpeed,
|
votingSpeed: session.votingSpeed,
|
||||||
lockedVote: session.lockedVote,
|
lockedVote: session.lockedVote,
|
||||||
isVoteInProgress: session.isVoteInProgress,
|
isVoteInProgress: session.isVoteInProgress,
|
||||||
|
|
Loading…
Add table
Reference in a new issue