mirror of
https://github.com/bra1n/townsquare.git
synced 2025-04-04 22:24:36 +00:00
Adding the Organ Grinder (#42)
* Adding Organ Grinder's icon * Adding Organ Grinder's English description * Adding Organ Grinder's French Description * Adding Organ Grinder's English Jinxes * Adding Organ Grinder's French Jinxes * Correcting a typo * Correcting a typo * Adding a new icon * Temporary change to test presence of new icon * Adding some texts They will be useful later * Adding some texts, useful later * Adding print in History for hidden vote * Correcting history's print * Adding new token for Organ Grinder * New token for Organ Grinder * Adding new (boolean) parameter for hidden vote * Adding a new option in the menue Without effect for now * Cancelling previous update * Adding new option in the menue For now, without the bad effect * Test: is the variable "isOrganGrinder" detected? * The option in the menue can now change a variable * Updating the saving of vote history Taking account the possibility of Organ Grinder * Correcting the previous commit Deleting an unexpected "locale" * Testing new way Because of its folder, this file doesn't have access to the grimoire. I test now to give the boolean "organVote" as a parameter. * Testing giving "organGrinder" as a parameter * Testing to find the "grimoire" variable * Adding a print for debbug * Deleting the console.log, but adding a new test * Test to know if the bool variable is seen * End of test, get back to the normal type * Test * Cancelling all changes in Vote.vue * Trying to access to the grimoire with an import * Testing again to import grimoire * Testing to print organGrinder * Gone back to the first changes Now, we just have to know where is the grimoire, for the import * Test for access to the grimoire * New test to find the grimoire * Trying to import 'state' instead of 'grimoire' * maybe the import is useless * Trying what happens if organGrinder=true * Trying access to index.js/state without conflict * Update session.js * Update session.js * Update session.js * Correcting typo * Update session.js * Update session.js * Update session.js * Update session.js * Update session.js * Update session.js * Update session.js * Update session.js * Update session.js * Update session.js * Final version of this file * Updating a sentence in singular * Correcting Organ Grinder's ability The Organ Grinder's ability is not active for exiles. * Hiding the number of votes if Organ Grinder * Trying new bool, maybe better that "isStoryTeller" * Update Vote.vue * Update Vote.vue * Just for a test * Update Vote.vue * It's just for a test * Cancelling all changes, I'll see it later * Updating to take account isOrganGrinderVoteMode * Allowing Story Teller to see history (even if there is an Organ Grinder) * Correcting ?: An "else" condition is necessary. * Trying to correct the error with new parenthesis * Hidding the number of hands up during vote Only for players, and only if there is an Organ Grinder * Test for hide vote * Update Player.vue * Cancelling changes * Test for icons * New test to confirm the "v-if" is detected * New test * Trying to add the "?" * Testing adding some new elements to print the "?" * Finishing the print of "?" The print wasn't printed for other players before the vote lock. * Corecting a careless mistake * Finalising the hidden votes - Correcting the conditions (the previous ones was for tests - Changing the colour of "?" * Adding a new colour * Removing the previous (and without effect) change * Adding a new colour
This commit is contained in:
parent
1ddfe66024
commit
3e859a8850
16 changed files with 165 additions and 13 deletions
BIN
src/assets/icons/organgrinder.png
Normal file
BIN
src/assets/icons/organgrinder.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 236 KiB |
|
@ -28,6 +28,7 @@ export default {
|
||||||
gradients: [
|
gradients: [
|
||||||
["demon", "#ce0100", "#000"],
|
["demon", "#ce0100", "#000"],
|
||||||
["townsfolk", "#1f65ff", "#000"],
|
["townsfolk", "#1f65ff", "#000"],
|
||||||
|
["minion", "#ff6900", "#000"],
|
||||||
["default", "#4E4E4E", "#000"]
|
["default", "#4E4E4E", "#000"]
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
|
@ -62,6 +62,17 @@
|
||||||
<template>{{ locale.menu.grimoire.ringBell }}</template>
|
<template>{{ locale.menu.grimoire.ringBell }}</template>
|
||||||
<em>[B]</em>
|
<em>[B]</em>
|
||||||
</li>
|
</li>
|
||||||
|
<li @click="toggleOrganVoteMode" v-if="!session.isSpectator">
|
||||||
|
{{ locale.menu.grimoire.organGrinder }}
|
||||||
|
<em>
|
||||||
|
<font-awesome-icon
|
||||||
|
:icon="[
|
||||||
|
'fas',
|
||||||
|
grimoire.isOrganVoteMode ? 'check-square' : 'square'
|
||||||
|
]"
|
||||||
|
/>
|
||||||
|
</em>
|
||||||
|
</li>
|
||||||
<li @click="toggleNightOrder" v-if="players.length">
|
<li @click="toggleNightOrder" v-if="players.length">
|
||||||
{{ locale.menu.grimoire.order }}
|
{{ locale.menu.grimoire.order }}
|
||||||
<em>
|
<em>
|
||||||
|
@ -361,6 +372,9 @@ export default {
|
||||||
this.$store.commit("session/setMarkedPlayer", -1);
|
this.$store.commit("session/setMarkedPlayer", -1);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
toggleOrganVoteMode() {
|
||||||
|
this.$store.commit("toggleOrganVoteMode");
|
||||||
|
},
|
||||||
toggleRinging() {
|
toggleRinging() {
|
||||||
this.$store.commit("toggleRinging", true);
|
this.$store.commit("toggleRinging", true);
|
||||||
setTimeout(this.$store.commit, 4000, "toggleRinging", false);
|
setTimeout(this.$store.commit, 4000, "toggleRinging", false);
|
||||||
|
|
|
@ -45,17 +45,33 @@
|
||||||
<!-- Overlay icons -->
|
<!-- Overlay icons -->
|
||||||
<div class="overlay">
|
<div class="overlay">
|
||||||
<font-awesome-icon
|
<font-awesome-icon
|
||||||
|
v-if="!grimoire.isOrganVoteMode || !session.isSpectator || player.id==session.playerId"
|
||||||
icon="hand-paper"
|
icon="hand-paper"
|
||||||
class="vote"
|
class="vote"
|
||||||
:title="locale.player.handUp"
|
:title="locale.player.handUp"
|
||||||
@click="vote()"
|
@click="vote()"
|
||||||
/>
|
/>
|
||||||
<font-awesome-icon
|
<font-awesome-icon
|
||||||
|
v-if="grimoire.isOrganVoteMode && session.isSpectator && player.id!==session.playerId"
|
||||||
|
icon="question"
|
||||||
|
class="vote"
|
||||||
|
:title="locale.player.handUp"
|
||||||
|
@click="vote()"
|
||||||
|
/>
|
||||||
|
<font-awesome-icon
|
||||||
|
v-if="!grimoire.isOrganVoteMode || !session.isSpectator || player.id==session.playerId"
|
||||||
icon="times"
|
icon="times"
|
||||||
class="vote"
|
class="vote"
|
||||||
:title="locale.player.handDown"
|
:title="locale.player.handDown"
|
||||||
@click="vote()"
|
@click="vote()"
|
||||||
/>
|
/>
|
||||||
|
<font-awesome-icon
|
||||||
|
v-if="grimoire.isOrganVoteMode && session.isSpectator && player.id!==session.playerId"
|
||||||
|
icon="question"
|
||||||
|
class="vote"
|
||||||
|
:title="locale.player.handDown"
|
||||||
|
@click="vote()"
|
||||||
|
/>
|
||||||
<font-awesome-icon
|
<font-awesome-icon
|
||||||
icon="times-circle"
|
icon="times-circle"
|
||||||
class="cancel"
|
class="cancel"
|
||||||
|
@ -555,11 +571,16 @@ export default {
|
||||||
&.fa-times * {
|
&.fa-times * {
|
||||||
fill: url(#townsfolk);
|
fill: url(#townsfolk);
|
||||||
}
|
}
|
||||||
|
&.fa-question * {
|
||||||
|
fill: url(#minion);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// other player voted yes, but is not locked yet
|
// other player voted yes, but is not locked yet
|
||||||
#townsquare.vote .player.vote-yes .overlay svg.vote.fa-hand-paper {
|
#townsquare.vote .player.vote-yes .overlay svg.vote.fa-hand-paper,
|
||||||
|
#townsquare.vote .player.vote-yes .overlay svg.vote.fa-question,
|
||||||
|
#townsquare.vote .player:not(.vote-yes) .overlay svg.vote.fa-question {
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
transform: scale(1);
|
transform: scale(1);
|
||||||
}
|
}
|
||||||
|
@ -567,7 +588,10 @@ export default {
|
||||||
// you voted yes | a locked vote yes | a locked vote no
|
// you voted yes | a locked vote yes | a locked vote no
|
||||||
#townsquare.vote .player.you.vote-yes .overlay svg.vote.fa-hand-paper,
|
#townsquare.vote .player.you.vote-yes .overlay svg.vote.fa-hand-paper,
|
||||||
#townsquare.vote .player.vote-lock.vote-yes .overlay svg.vote.fa-hand-paper,
|
#townsquare.vote .player.vote-lock.vote-yes .overlay svg.vote.fa-hand-paper,
|
||||||
#townsquare.vote .player.vote-lock:not(.vote-yes) .overlay svg.vote.fa-times {
|
#townsquare.vote .player.vote-lock:not(.vote-yes) .overlay svg.vote.fa-times,
|
||||||
|
#townsquare.vote .player.you.vote-yes .overlay svg.vote.fa-question,
|
||||||
|
#townsquare.vote .player.vote-lock.vote-yes .overlay svg.vote.fa-question,
|
||||||
|
#townsquare.vote .player.vote-lock:not(.vote-yes) .overlay svg.vote.fa-question {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
transform: scale(1);
|
transform: scale(1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,9 +10,12 @@
|
||||||
<em>{{ nominee.name }}</em
|
<em>{{ nominee.name }}</em
|
||||||
>!
|
>!
|
||||||
<br />
|
<br />
|
||||||
<em class="blue">
|
<em class="blue" v-if="!grimoire.isOrganVoteMode || nominee.role.team == 'traveler' || !session.isSpectator">
|
||||||
{{ voters.length }} {{ locale.vote.votes }}
|
{{ voters.length }} {{ locale.vote.votes }}
|
||||||
</em>
|
</em>
|
||||||
|
<em class="blue" v-else>
|
||||||
|
? {{ locale.vote.votes }}
|
||||||
|
</em>
|
||||||
{{ locale.vote.inFavor }}
|
{{ locale.vote.inFavor }}
|
||||||
<em v-if="nominee.role.team !== 'traveler'">
|
<em v-if="nominee.role.team !== 'traveler'">
|
||||||
({{ locale.vote.majorityIs }} {{ Math.ceil(alive / 2) }})
|
({{ locale.vote.majorityIs }} {{ Math.ceil(alive / 2) }})
|
||||||
|
|
|
@ -65,7 +65,7 @@
|
||||||
<td>{{ vote.nominee }}</td>
|
<td>{{ vote.nominee }}</td>
|
||||||
<td>{{ vote.type }}</td>
|
<td>{{ vote.type }}</td>
|
||||||
<td>
|
<td>
|
||||||
{{ vote.votes.length }}
|
{{ vote.votes == null ? "?" : vote.votes.length }}
|
||||||
<font-awesome-icon icon="hand-paper" />
|
<font-awesome-icon icon="hand-paper" />
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
@ -73,12 +73,12 @@
|
||||||
<font-awesome-icon
|
<font-awesome-icon
|
||||||
:icon="[
|
:icon="[
|
||||||
'fas',
|
'fas',
|
||||||
vote.votes.length >= vote.majority ? 'check-square' : 'square'
|
vote.votes == null ? 'minus-square' : ( vote.votes.length >= vote.majority ? 'check-square' : 'square' )
|
||||||
]"
|
]"
|
||||||
/>
|
/>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{{ vote.votes.join(", ") }}
|
{{ vote.votes == null ? locale.modal.voteHistory.hiddenVote : vote.votes.join(", ") }}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
|
@ -30,6 +30,7 @@ const faIcons = [
|
||||||
"Image",
|
"Image",
|
||||||
"Link",
|
"Link",
|
||||||
"MinusCircle",
|
"MinusCircle",
|
||||||
|
"MinusSquare",
|
||||||
"Music",
|
"Music",
|
||||||
"PeopleArrows",
|
"PeopleArrows",
|
||||||
"PlusCircle",
|
"PlusCircle",
|
||||||
|
|
|
@ -111,6 +111,7 @@ export default new Vuex.Store({
|
||||||
isMuted: false,
|
isMuted: false,
|
||||||
isImageOptIn: false,
|
isImageOptIn: false,
|
||||||
isStreamerMode: false,
|
isStreamerMode: false,
|
||||||
|
isOrganVoteMode: false,
|
||||||
zoom: 0,
|
zoom: 0,
|
||||||
background: "",
|
background: "",
|
||||||
timer: {
|
timer: {
|
||||||
|
@ -185,6 +186,7 @@ export default new Vuex.Store({
|
||||||
toggleGrimoire: toggle("isPublic"),
|
toggleGrimoire: toggle("isPublic"),
|
||||||
toggleImageOptIn: toggle("isImageOptIn"),
|
toggleImageOptIn: toggle("isImageOptIn"),
|
||||||
toggleStreamerMode: toggle("isStreamerMode"),
|
toggleStreamerMode: toggle("isStreamerMode"),
|
||||||
|
toggleOrganVoteMode: toggle("isOrganVoteMode"),
|
||||||
setTimer(state, timer) {
|
setTimer(state, timer) {
|
||||||
state.grimoire.timer = timer;
|
state.grimoire.timer = timer;
|
||||||
},
|
},
|
||||||
|
|
|
@ -372,5 +372,30 @@
|
||||||
"reason": "If the Lleech has poisoned the Heretic then the Lleech dies, the Heretic remains poisoned."
|
"reason": "If the Lleech has poisoned the Heretic then the Lleech dies, the Heretic remains poisoned."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "Organ Grinder",
|
||||||
|
"hatred": [
|
||||||
|
{
|
||||||
|
"id": "Butler",
|
||||||
|
"reason": "If the Organ Grinder is causing eyes closed voting, the Butler may raise their hand to vote but their vote is only counted if their master voted too."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "Flowergirl",
|
||||||
|
"reason": "If players' eyes were closed during the nominations, the Flowergirl learns how many times the Demon voted."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "Lil' Monsta",
|
||||||
|
"reason": "Votes for the Organ Grinder count if the Organ Grinder is babysitting Lil' Monsta."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "Minstrel",
|
||||||
|
"reason": "Only 1 jinxed character can be in play. Evil players start knowing which player and character it is."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "Preacher",
|
||||||
|
"reason": "Only 1 jinxed character can be in play. Evil players start knowing which player and character it is."
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -1637,6 +1637,20 @@
|
||||||
"setup": false,
|
"setup": false,
|
||||||
"ability": "If you are executed, all but 3 players die. 1 minute later, the player with the most players pointing at them dies."
|
"ability": "If you are executed, all but 3 players die. 1 minute later, the player with the most players pointing at them dies."
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"id": "organgrinder",
|
||||||
|
"name": "Organ Grinder",
|
||||||
|
"edition": "",
|
||||||
|
"team": "minion",
|
||||||
|
"firstNight": 0,
|
||||||
|
"firstNightReminder": "",
|
||||||
|
"otherNight": 0,
|
||||||
|
"otherNightReminder": "",
|
||||||
|
"reminders": ["About to die",
|
||||||
|
"Used vote"],
|
||||||
|
"setup": false,
|
||||||
|
"ability": "All players keep their eyes closed when voting & the vote tally is secret. Votes for you only count if you vote."
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "lilmonsta",
|
"id": "lilmonsta",
|
||||||
"name": "Lil' Monsta",
|
"name": "Lil' Monsta",
|
||||||
|
|
|
@ -13,7 +13,8 @@
|
||||||
"streamerMode": "Streamer Mode",
|
"streamerMode": "Streamer Mode",
|
||||||
"animations": "Disable Animations",
|
"animations": "Disable Animations",
|
||||||
"mute": "Mute Sounds",
|
"mute": "Mute Sounds",
|
||||||
"ringBell": "Ring Bell"
|
"ringBell": "Ring Bell",
|
||||||
|
"organGrinder ": "Organ Grinder Vote"
|
||||||
},
|
},
|
||||||
"session":{
|
"session":{
|
||||||
"title":{
|
"title":{
|
||||||
|
@ -238,7 +239,8 @@
|
||||||
"type": "Type",
|
"type": "Type",
|
||||||
"votes": "Votes",
|
"votes": "Votes",
|
||||||
"majority": "Majority",
|
"majority": "Majority",
|
||||||
"voters": "Voters"
|
"voters": "Voters",
|
||||||
|
"hiddenVote": "The result is hidden because of the Organ Grinder"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -359,5 +359,30 @@
|
||||||
"reason": "Si le Tueur tire sur l'hôte de la Sangsue, l'hôte meurt. "
|
"reason": "Si le Tueur tire sur l'hôte de la Sangsue, l'hôte meurt. "
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "Organ Grinder",
|
||||||
|
"hatred": [
|
||||||
|
{
|
||||||
|
"id": "Butler",
|
||||||
|
"reason": "Si les votes ont lieu à bulletin secret à cause de l'Organiste, le Majordome peut lever sa main mais son vote ne compte que si son maître la lève aussi."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "Flowergirl",
|
||||||
|
"reason": "Si les votes ont eu lieu à bulletin secret, la Fleuriste apprend combien de fois le Démon a voté."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "Lil' Monsta",
|
||||||
|
"reason": "Les votes contre l'Organsite comptent si l'Organiste baby-sitte le Bébé Monstre."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "Minstrel",
|
||||||
|
"reason": "Un seul personnage maudit peut être en jeu à la fois. Les joueurs Mauvais commencent la partie en sachant de quel joueur et quel rôle il s'agit."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "Preacher",
|
||||||
|
"reason": "Un seul personnage maudit peut être en jeu à la fois. Les joueurs Mauvais commencent la partie en sachant de quel joueur et quel rôle il s'agit."
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -1811,6 +1811,22 @@
|
||||||
"setup": false,
|
"setup": false,
|
||||||
"ability": "Si vous êtes exécuté, tous les joueurs sauf 3 meurent. 1 minute plus tard, le joueur le plus accusé meurt."
|
"ability": "Si vous êtes exécuté, tous les joueurs sauf 3 meurent. 1 minute plus tard, le joueur le plus accusé meurt."
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"id": "organgrinder",
|
||||||
|
"name": "Organiste",
|
||||||
|
"edition": "",
|
||||||
|
"team": "minion",
|
||||||
|
"firstNight": 0,
|
||||||
|
"firstNightReminder": "",
|
||||||
|
"otherNight": 0,
|
||||||
|
"otherNightReminder": "",
|
||||||
|
"reminders": [
|
||||||
|
"Condamné",
|
||||||
|
"Vote utilisé"
|
||||||
|
],
|
||||||
|
"setup": false,
|
||||||
|
"ability": "Les votes ont lieu à bulletin secret. Vous ne pouvez être exécuté que si vous levez la main."
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "lilmonsta",
|
"id": "lilmonsta",
|
||||||
"name": "Bébé monstre",
|
"name": "Bébé monstre",
|
||||||
|
|
|
@ -13,7 +13,8 @@
|
||||||
"streamerMode": "Mode Streamer",
|
"streamerMode": "Mode Streamer",
|
||||||
"animations": "Effets réduits",
|
"animations": "Effets réduits",
|
||||||
"mute": "Silencieux",
|
"mute": "Silencieux",
|
||||||
"ringBell": "Sonner Clocher"
|
"ringBell": "Sonner Clocher",
|
||||||
|
"organGrinder": "Vote d'Organiste"
|
||||||
},
|
},
|
||||||
"session":{
|
"session":{
|
||||||
"title":{
|
"title":{
|
||||||
|
@ -238,7 +239,8 @@
|
||||||
"type": "Type",
|
"type": "Type",
|
||||||
"votes": "Voix",
|
"votes": "Voix",
|
||||||
"majority": "Majorité",
|
"majority": "Majorité",
|
||||||
"voters": "Votants"
|
"voters": "Votants",
|
||||||
|
"hiddenVote": "Résultat caché par l'Organiste"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
import gameInfo from '../index.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle a vote request.
|
* Handle a vote request.
|
||||||
* If the vote is from a seat that is already locked, ignore it.
|
* If the vote is from a seat that is already locked, ignore it.
|
||||||
|
@ -71,6 +73,7 @@ const mutations = {
|
||||||
/**
|
/**
|
||||||
* Create an entry in the vote history log. Requires current player array because it might change later in the game.
|
* Create an entry in the vote history log. Requires current player array because it might change later in the game.
|
||||||
* Only stores votes that were completed.
|
* Only stores votes that were completed.
|
||||||
|
* If the Organ Grinder is active, save the votes only for the Story Teller
|
||||||
* @param state
|
* @param state
|
||||||
* @param players
|
* @param players
|
||||||
*/
|
*/
|
||||||
|
@ -78,15 +81,17 @@ const mutations = {
|
||||||
if (!state.isVoteHistoryAllowed && state.isSpectator) return;
|
if (!state.isVoteHistoryAllowed && state.isSpectator) return;
|
||||||
if (!state.nomination || state.lockedVote <= players.length) return;
|
if (!state.nomination || state.lockedVote <= players.length) return;
|
||||||
const isExile = players[state.nomination[1]].role.team === "traveler";
|
const isExile = players[state.nomination[1]].role.team === "traveler";
|
||||||
|
const organGrinder = gameInfo.state.grimoire.isOrganVoteMode && !isExile;
|
||||||
state.voteHistory.push({
|
state.voteHistory.push({
|
||||||
timestamp: new Date(),
|
timestamp: new Date(),
|
||||||
nominator: players[state.nomination[0]].name,
|
nominator: players[state.nomination[0]].name,
|
||||||
nominee: players[state.nomination[1]].name,
|
nominee: players[state.nomination[1]].name,
|
||||||
type: isExile ? "Exile" : "Execution",
|
type: isExile ? "Exile" : ("Execution" + ((organGrinder && !state.isSpectator) ? "*" : "")),
|
||||||
majority: Math.ceil(
|
majority: Math.ceil(
|
||||||
players.filter(player => !player.isDead || isExile).length / 2
|
players.filter(player => !player.isDead || isExile).length / 2
|
||||||
),
|
),
|
||||||
votes: players
|
votes: organGrinder && state.isSpectator ? null :
|
||||||
|
players
|
||||||
.filter((player, index) => state.votes[index])
|
.filter((player, index) => state.votes[index])
|
||||||
.map(({ name }) => name)
|
.map(({ name }) => name)
|
||||||
});
|
});
|
||||||
|
|
|
@ -176,6 +176,10 @@ class LiveSession {
|
||||||
if (!this._isSpectator) return;
|
if (!this._isSpectator) return;
|
||||||
this._store.commit("toggleNight", params);
|
this._store.commit("toggleNight", params);
|
||||||
break;
|
break;
|
||||||
|
case "isOrganVoteMode":
|
||||||
|
if (!this._isSpectator) return;
|
||||||
|
this._store.commit("toggleOrganVoteMode", params);
|
||||||
|
break;
|
||||||
case "isRinging":
|
case "isRinging":
|
||||||
if (!this._isSpectator) return;
|
if (!this._isSpectator) return;
|
||||||
this._store.commit("toggleRinging", params);
|
this._store.commit("toggleRinging", params);
|
||||||
|
@ -288,6 +292,7 @@ class LiveSession {
|
||||||
isRinging: grimoire.isRinging,
|
isRinging: grimoire.isRinging,
|
||||||
timer: grimoire.timer,
|
timer: grimoire.timer,
|
||||||
isVoteHistoryAllowed: session.isVoteHistoryAllowed,
|
isVoteHistoryAllowed: session.isVoteHistoryAllowed,
|
||||||
|
isOrganVoteMode: grimoire.isOrganVoteMode,
|
||||||
nomination: session.nomination,
|
nomination: session.nomination,
|
||||||
votingSpeed: session.votingSpeed,
|
votingSpeed: session.votingSpeed,
|
||||||
lockedVote: session.lockedVote,
|
lockedVote: session.lockedVote,
|
||||||
|
@ -312,6 +317,7 @@ class LiveSession {
|
||||||
isNight,
|
isNight,
|
||||||
isVoteHistoryAllowed,
|
isVoteHistoryAllowed,
|
||||||
isRinging,
|
isRinging,
|
||||||
|
isOrganVoteMode,
|
||||||
timer,
|
timer,
|
||||||
nomination,
|
nomination,
|
||||||
votingSpeed,
|
votingSpeed,
|
||||||
|
@ -368,6 +374,7 @@ class LiveSession {
|
||||||
this._store.commit("toggleRinging", !!isRinging);
|
this._store.commit("toggleRinging", !!isRinging);
|
||||||
this._store.commit("toggleNight", !!isNight);
|
this._store.commit("toggleNight", !!isNight);
|
||||||
this._store.commit("session/setVoteHistoryAllowed", isVoteHistoryAllowed);
|
this._store.commit("session/setVoteHistoryAllowed", isVoteHistoryAllowed);
|
||||||
|
this._store.commit("toggleOrganVoteMode", !!isOrganVoteMode);
|
||||||
this._store.commit("session/nomination", {
|
this._store.commit("session/nomination", {
|
||||||
nomination,
|
nomination,
|
||||||
votes,
|
votes,
|
||||||
|
@ -725,6 +732,14 @@ class LiveSession {
|
||||||
this._send("isRinging", this._store.state.grimoire.isRinging);
|
this._send("isRinging", this._store.state.grimoire.isRinging);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Send the isOrganVoteMode status. ST only
|
||||||
|
*/
|
||||||
|
setIsOrganVoteMode() {
|
||||||
|
if (this._isSpectator) return;
|
||||||
|
this._send("isOrganVoteMode", this._store.state.grimoire.isOrganVoteMode);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Start or stop a timer
|
* Start or stop a timer
|
||||||
*/
|
*/
|
||||||
|
@ -914,6 +929,9 @@ export default store => {
|
||||||
case "toggleNight":
|
case "toggleNight":
|
||||||
session.setIsNight();
|
session.setIsNight();
|
||||||
break;
|
break;
|
||||||
|
case "toggleOrganVoteMode":
|
||||||
|
session.setIsOrganVoteMode();
|
||||||
|
break;
|
||||||
case "toggleRinging":
|
case "toggleRinging":
|
||||||
session.setIsRinging();
|
session.setIsRinging();
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Reference in a new issue