From 1096bb0a3c00957cf3d2c69db75791b18b4506b1 Mon Sep 17 00:00:00 2001 From: MRegnard <62838312+MRegnard@users.noreply.github.com> Date: Sun, 19 Nov 2023 14:40:58 +0100 Subject: [PATCH 1/2] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6245b0a..d7d24ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Release Notes ## Upcomming Version +Correcting automatic adding/deletion of Fabled ### Version 3.17.0 From 442aaff53979d3f88a714c14c2438b4bed388b1d Mon Sep 17 00:00:00 2001 From: MRegnard <62838312+MRegnard@users.noreply.github.com> Date: Sun, 19 Nov 2023 14:48:01 +0100 Subject: [PATCH 2/2] Deleting Fabled while changing script --- src/components/modals/EditionModal.vue | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/src/components/modals/EditionModal.vue b/src/components/modals/EditionModal.vue index ecfdbb8..14fe6a3 100644 --- a/src/components/modals/EditionModal.vue +++ b/src/components/modals/EditionModal.vue @@ -44,7 +44,7 @@ )})`, }" :key="edition.id" - @click="setEdition(edition)" + @click="runEdition(edition)" > {{ edition.name }} @@ -191,16 +191,19 @@ export default { "setEdition", Object.assign({}, meta, { id: "custom" }), ); - // check for fabled and set those too, if present - if (roles.some((role) => this.$store.state.fabled.has(role.id || role))) { - const fabled = []; - roles.forEach((role) => { - if (this.$store.state.fabled.has(role.id || role)) { - fabled.push(this.$store.state.fabled.get(role.id || role)); - } - }); - this.$store.commit("players/setFabled", { fabled }); - } + // set fabled + const fabled = []; + roles.forEach((role) => { + if (this.$store.state.fabled.has(role.id || role)) { + fabled.push(this.$store.state.fabled.get(role.id || role)); + } + }); + 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"]), },