diff --git a/changelog.md b/changelog.md index f315181f..97bdd61f 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,9 @@ # 13.0 +## 13.0.48 - Les vagabondages d'Illisys + +- suppression du type de TMR "Inconnu" des feuilles de création de signes draconiques (ce type sert uniquement pour le cas où une case saisie à la main est incorrecte) + ## 13.0.47 - Les goûts et les couleurs d'Illisys - Correction des couleurs des tooltips d'aide foundry diff --git a/module/dialog-create-signedraconique.js b/module/dialog-create-signedraconique.js index 83ced72f..a1ec2022 100644 --- a/module/dialog-create-signedraconique.js +++ b/module/dialog-create-signedraconique.js @@ -90,9 +90,9 @@ export class DialogCreateSigneDraconique extends Dialog { this.html.find("[name='signe.system.difficulte']").val(newSigne.system.difficulte); this.html.find("[name='signe.system.duree']").val(newSigne.system.duree); this.html.find("[name='signe.system.ephemere']").prop("checked", newSigne.system.ephemere); - this.dialogData.tmrs = TMRUtility.buildSelectionTypesTMR(newSigne.system.typesTMR); - this.dialogData.tmrs.forEach(t => { - this.html.find(`[data-tmr-name='${t.name}']`).prop("checked", t.selected); + this.dialogData.tmrs = TMRUtility.buildSelectionTypesTMR(newSigne.system.typesTMR) + this.dialogData.tmrs.forEach(it => { + this.html.find(`[data-tmr-name='${it.name}']`).prop("checked", it.selected); }) this.setEphemere(newSigne.system.ephemere); } diff --git a/module/item/sheet-signedraconique.js b/module/item/sheet-signedraconique.js index 2f9f0b58..446d62e5 100644 --- a/module/item/sheet-signedraconique.js +++ b/module/item/sheet-signedraconique.js @@ -24,9 +24,9 @@ export class RdDSigneDraconiqueItemSheet extends RdDItemSheetV1 { /* -------------------------------------------- */ async getData() { const formData = await super.getData(); - this.tmrs = TMRUtility.buildSelectionTypesTMR(this.item.system.typesTMR); - formData.tmrs = this.tmrs; - return formData; + this.tmrs = TMRUtility.buildSelectionTypesTMR(this.item.system.typesTMR) + formData.tmrs = this.tmrs + return formData } /* -------------------------------------------- */ diff --git a/module/tmr-utility.js b/module/tmr-utility.js index 406932bd..8767a51e 100644 --- a/module/tmr-utility.js +++ b/module/tmr-utility.js @@ -309,7 +309,9 @@ export class TMRUtility { static buildSelectionTypesTMR(typesTMR) { typesTMR = typesTMR ?? []; - return Object.values(TMRType).map(value => Misc.upperFirst(value.name)) + return Object.values(TMRType) + .filter(it => it.type != TMR_INCONNU) + .map(it => Misc.upperFirst(it.name)) .sort() .map(name => { return { name: name, selected: typesTMR.includes(name) } }); }