mirror of
https://github.com/bra1n/townsquare.git
synced 2025-04-04 22:24:36 +00:00
tidy loose ends
This commit is contained in:
parent
17799073a0
commit
078eedbf74
2 changed files with 4 additions and 5 deletions
|
@ -238,6 +238,7 @@ export default new Vuex.Store({
|
|||
state.modals.edition = false;
|
||||
},
|
||||
updateGameState(state, data) {
|
||||
// data from socket _sendGameState
|
||||
const {
|
||||
playerState,
|
||||
isLightweight,
|
||||
|
@ -249,7 +250,7 @@ export default new Vuex.Store({
|
|||
votes,
|
||||
lockedVote,
|
||||
isVoteInProgress,
|
||||
markedPlayer,
|
||||
markedPlayer,
|
||||
fabled,
|
||||
bluffs
|
||||
} = data;
|
||||
|
@ -278,7 +279,6 @@ export default new Vuex.Store({
|
|||
const { roleId } = state;
|
||||
if (roleId == {} && player.role.team === "traveler" && roleId !== -1) {
|
||||
// special case for when a player stopped being a traveler
|
||||
console.log("special case", roleId);
|
||||
this.commit("players/update", {
|
||||
player,
|
||||
property: "role",
|
||||
|
@ -290,7 +290,6 @@ export default new Vuex.Store({
|
|||
this.getters.rolesJSONbyId.get(roleId) ||
|
||||
{};
|
||||
if (role) {
|
||||
console.log("normal case", roleId);
|
||||
this.commit("players/update", {
|
||||
player,
|
||||
property: "role",
|
||||
|
@ -320,7 +319,7 @@ export default new Vuex.Store({
|
|||
});
|
||||
this.commit("session/setMarkedPlayer", markedPlayer);
|
||||
this.commit("players/setFabled", {
|
||||
fabled: fabled.map(f => this._store.state.fabled.get(f.id) || f)
|
||||
fabled: fabled.map(f => state.fabled.get(f.id) || f)
|
||||
});
|
||||
// bluffs
|
||||
if (bluffs !== -1) {
|
||||
|
|
|
@ -315,7 +315,7 @@ class LiveSession {
|
|||
_updateGamestate(data) {
|
||||
if (!this._isSpectator) return;
|
||||
if (data.isRevealedGrimoire) {
|
||||
// special case: this includes ALL roles, reminders & bluffs
|
||||
// special case: includes ALL roles, reminders & bluffs
|
||||
// would overwrite users notes, so we have to (store and) ask before applying
|
||||
this._store.commit("session/setRevealedGrimoire", data);
|
||||
return;
|
||||
|
|
Loading…
Add table
Reference in a new issue