mirror of
https://github.com/bra1n/townsquare.git
synced 2025-04-04 22:24:36 +00:00
Deleting Fabled while changing script
This commit is contained in:
parent
1096bb0a3c
commit
442aaff539
1 changed files with 14 additions and 11 deletions
|
@ -44,7 +44,7 @@
|
||||||
)})`,
|
)})`,
|
||||||
}"
|
}"
|
||||||
:key="edition.id"
|
:key="edition.id"
|
||||||
@click="setEdition(edition)"
|
@click="runEdition(edition)"
|
||||||
>
|
>
|
||||||
{{ edition.name }}
|
{{ edition.name }}
|
||||||
</li>
|
</li>
|
||||||
|
@ -191,16 +191,19 @@ export default {
|
||||||
"setEdition",
|
"setEdition",
|
||||||
Object.assign({}, meta, { id: "custom" }),
|
Object.assign({}, meta, { id: "custom" }),
|
||||||
);
|
);
|
||||||
// check for fabled and set those too, if present
|
// set fabled
|
||||||
if (roles.some((role) => this.$store.state.fabled.has(role.id || role))) {
|
const fabled = [];
|
||||||
const fabled = [];
|
roles.forEach((role) => {
|
||||||
roles.forEach((role) => {
|
if (this.$store.state.fabled.has(role.id || role)) {
|
||||||
if (this.$store.state.fabled.has(role.id || role)) {
|
fabled.push(this.$store.state.fabled.get(role.id || role));
|
||||||
fabled.push(this.$store.state.fabled.get(role.id || role));
|
}
|
||||||
}
|
});
|
||||||
});
|
this.$store.commit("players/setFabled", { fabled });
|
||||||
this.$store.commit("players/setFabled", { fabled });
|
},
|
||||||
}
|
runEdition(edition) {
|
||||||
|
this.$store.commit("setEdition", edition);
|
||||||
|
// The editions contain no Fabled
|
||||||
|
this.$store.commit("players/setFabled", { fabled: [] });
|
||||||
},
|
},
|
||||||
...mapMutations(["toggleModal", "setEdition"]),
|
...mapMutations(["toggleModal", "setEdition"]),
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue