unbreak custom role script

This commit is contained in:
Steffen 2020-07-03 21:28:42 +02:00
parent 2776f58366
commit b47b45ceb2
No known key found for this signature in database
GPG Key ID: 764D74E98267DFC6
3 changed files with 6 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "townsquare", "name": "townsquare",
"version": "1.3.0", "version": "1.3.1",
"description": "Blood on the Clocktower Town Square", "description": "Blood on the Clocktower Town Square",
"author": "Steffen Baumgart", "author": "Steffen Baumgart",
"scripts": { "scripts": {

View File

@ -126,6 +126,7 @@ export default new Vuex.Store({
) )
// default empty icons to good / evil / traveler // default empty icons to good / evil / traveler
.map(role => { .map(role => {
if (rolesJSONbyId.get(role.id)) return role;
if (role.team === "townsfolk" || role.team === "outsider") { if (role.team === "townsfolk" || role.team === "outsider") {
role.image = role.image || imageBase + "good.png"; role.image = role.image || imageBase + "good.png";
} else if (role.team === "demon" || role.team === "minion") { } else if (role.team === "demon" || role.team === "minion") {

View File

@ -256,7 +256,10 @@ class LiveSession {
if (!this._isSpectator) return; if (!this._isSpectator) return;
this._store.commit("setEdition", edition); this._store.commit("setEdition", edition);
if (roles) { if (roles) {
this._store.commit("setCustomRoles", roles); this._store.commit(
"setCustomRoles",
roles.map(id => ({ id }))
);
} }
} }