mirror of https://github.com/bra1n/townsquare.git
load roles from gamestate that belong to different editions (like travelers)
This commit is contained in:
parent
984c02980c
commit
efa4a0fa4b
|
@ -1,6 +1,7 @@
|
||||||
# Release Notes
|
# Release Notes
|
||||||
|
|
||||||
## Version 2.0.3
|
## Version 2.0.3
|
||||||
|
- load roles that belong to different editions (like travelers) from gamestate
|
||||||
- close session when missing custom roles and open edition modal
|
- close session when missing custom roles and open edition modal
|
||||||
- added a few more metrics
|
- added a few more metrics
|
||||||
|
|
||||||
|
|
|
@ -92,7 +92,10 @@ export default {
|
||||||
"players/set",
|
"players/set",
|
||||||
players.map(player => ({
|
players.map(player => ({
|
||||||
...player,
|
...player,
|
||||||
role: this.$store.state.roles.get(player.role) || {}
|
role:
|
||||||
|
this.$store.state.roles.get(player.role) ||
|
||||||
|
this.$store.getters.rolesJSONbyId.get(player.role) ||
|
||||||
|
{}
|
||||||
}))
|
}))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -102,7 +102,8 @@ export default new Vuex.Store({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return customRoles;
|
return customRoles;
|
||||||
}
|
},
|
||||||
|
rolesJSONbyId: () => rolesJSONbyId
|
||||||
},
|
},
|
||||||
mutations: {
|
mutations: {
|
||||||
toggleMenu({ grimoire }) {
|
toggleMenu({ grimoire }) {
|
||||||
|
|
|
@ -21,7 +21,8 @@ module.exports = store => {
|
||||||
JSON.parse(localStorage.bluffs).forEach((role, index) => {
|
JSON.parse(localStorage.bluffs).forEach((role, index) => {
|
||||||
store.commit("players/setBluff", {
|
store.commit("players/setBluff", {
|
||||||
index,
|
index,
|
||||||
role: store.state.roles.get(role) || {}
|
role:
|
||||||
|
store.state.roles.get(role) || {}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -37,7 +38,10 @@ module.exports = store => {
|
||||||
"players/set",
|
"players/set",
|
||||||
JSON.parse(localStorage.players).map(player => ({
|
JSON.parse(localStorage.players).map(player => ({
|
||||||
...player,
|
...player,
|
||||||
role: store.state.roles.get(player.role) || {}
|
role:
|
||||||
|
store.state.roles.get(player.role) ||
|
||||||
|
store.getters.rolesJSONbyId.get(player.role) ||
|
||||||
|
{}
|
||||||
}))
|
}))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue