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",
|
"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": {
|
||||||
|
|
|
@ -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") {
|
||||||
|
|
|
@ -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 }))
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue