You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With some vote modifiers that I'd like to automatically take into account (Banshee, Thief, Bureaucrat...) then the list of voters is not enough to deduce the number of votes.
That's why I am re-writing addHistory, to have addHistory(state, players, nbVotes) instead of addHistory(state, players).
But this mean I have to change some things, and it seems I forgot some of them.
I corrected VoteHistoryModal.vue, to take account of this true number of votes.
In Vote.vue, I changed a line in the method finish(): this.$store.commit("session/addHistory", this.players, this.votesCount); instead of this.$store.commit("session/addHistory", this.players); (voteCount is a "computed" I added in Vote.vue).
In socket.js, I tried to correct this part of the code
case "nomination":
if (!this._isSpectator) return;
if (!params) {
// create vote history record
this._store.commit(
"session/addHistory",
this._store.state.players.players,
// Here, I tried this._store.voteCount, this._store.state.voteCount and this._store.state.players.voteCount,
);
}
this._store.commit("session/nomination", { nomination: params });
So I think there are two possible explanations: either I correctly identified what I must edit, but I didn't correctly edit socket.js (possible, I am really not sure of the correct syntax), either I forgot at least one last file I have to edit too.
Do you have some idea of what I missed?
Thanks in advance
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi!
With some vote modifiers that I'd like to automatically take into account (Banshee, Thief, Bureaucrat...) then the list of voters is not enough to deduce the number of votes.
That's why I am re-writing
addHistory
, to haveaddHistory(state, players, nbVotes)
instead ofaddHistory(state, players)
.But this mean I have to change some things, and it seems I forgot some of them.
finish()
:this.$store.commit("session/addHistory", this.players, this.votesCount);
instead ofthis.$store.commit("session/addHistory", this.players);
(voteCount is a "computed" I added in Vote.vue).So I think there are two possible explanations: either I correctly identified what I must edit, but I didn't correctly edit socket.js (possible, I am really not sure of the correct syntax), either I forgot at least one last file I have to edit too.
Do you have some idea of what I missed?
Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions