mirror of https://github.com/bra1n/townsquare.git
unbreak custom role script
This commit is contained in:
parent
2776f58366
commit
b47b45ceb2
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "townsquare",
|
||||
"version": "1.3.0",
|
||||
"version": "1.3.1",
|
||||
"description": "Blood on the Clocktower Town Square",
|
||||
"author": "Steffen Baumgart",
|
||||
"scripts": {
|
||||
|
|
|
@ -126,6 +126,7 @@ export default new Vuex.Store({
|
|||
)
|
||||
// default empty icons to good / evil / traveler
|
||||
.map(role => {
|
||||
if (rolesJSONbyId.get(role.id)) return role;
|
||||
if (role.team === "townsfolk" || role.team === "outsider") {
|
||||
role.image = role.image || imageBase + "good.png";
|
||||
} else if (role.team === "demon" || role.team === "minion") {
|
||||
|
|
|
@ -256,7 +256,10 @@ class LiveSession {
|
|||
if (!this._isSpectator) return;
|
||||
this._store.commit("setEdition", edition);
|
||||
if (roles) {
|
||||
this._store.commit("setCustomRoles", roles);
|
||||
this._store.commit(
|
||||
"setCustomRoles",
|
||||
roles.map(id => ({ id }))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue