mirror of https://github.com/bra1n/townsquare.git
getting player pronouns to be synced over sockets layer
This commit is contained in:
parent
03731bc887
commit
48eab1fa8c
|
@ -245,6 +245,7 @@ export default {
|
|||
prompt("Player preffered pronouns", this.player.pronoun) ||
|
||||
this.player.pronoun;
|
||||
this.updatePlayer("pronoun", pronoun, true);
|
||||
this.$emit("trigger", ["updatePlayer", this.player, "pronoun", pronoun]);
|
||||
},
|
||||
toggleStatus() {
|
||||
if (this.grimoire.isPublic) {
|
||||
|
|
|
@ -222,6 +222,7 @@ class LiveSession {
|
|||
id: player.id,
|
||||
isDead: player.isDead,
|
||||
isVoteless: player.isVoteless,
|
||||
pronoun: player.pronoun,
|
||||
...(player.role && player.role.team === "traveler"
|
||||
? { roleId: player.role.id }
|
||||
: {})
|
||||
|
@ -279,7 +280,7 @@ class LiveSession {
|
|||
const player = players[x];
|
||||
const { roleId } = state;
|
||||
// update relevant properties
|
||||
["name", "id", "isDead", "isVoteless"].forEach(property => {
|
||||
["name", "id", "isDead", "isVoteless", "pronoun"].forEach(property => {
|
||||
const value = state[property];
|
||||
if (player[property] !== value) {
|
||||
this._store.commit("players/update", { player, property, value });
|
||||
|
|
Loading…
Reference in New Issue