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
|
||||
|
||||
## 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
|
||||
- added a few more metrics
|
||||
|
||||
|
|
|
@ -92,7 +92,10 @@ export default {
|
|||
"players/set",
|
||||
players.map(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;
|
||||
}
|
||||
},
|
||||
rolesJSONbyId: () => rolesJSONbyId
|
||||
},
|
||||
mutations: {
|
||||
toggleMenu({ grimoire }) {
|
||||
|
|
|
@ -21,7 +21,8 @@ module.exports = store => {
|
|||
JSON.parse(localStorage.bluffs).forEach((role, index) => {
|
||||
store.commit("players/setBluff", {
|
||||
index,
|
||||
role: store.state.roles.get(role) || {}
|
||||
role:
|
||||
store.state.roles.get(role) || {}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -37,7 +38,10 @@ module.exports = store => {
|
|||
"players/set",
|
||||
JSON.parse(localStorage.players).map(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