mirror of
https://github.com/bra1n/townsquare.git
synced 2025-04-04 22:24:36 +00:00
Merge pull request #120 from MRegnard:fabled_set_script
Deleting Fabled while we set script
This commit is contained in:
commit
64a3c92df7
2 changed files with 15 additions and 11 deletions
|
@ -1,6 +1,7 @@
|
||||||
# Release Notes
|
# Release Notes
|
||||||
|
|
||||||
## Upcomming Version
|
## Upcomming Version
|
||||||
|
Correcting automatic adding/deletion of Fabled
|
||||||
|
|
||||||
### Version 3.17.0
|
### Version 3.17.0
|
||||||
|
|
||||||
|
|
|
@ -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