Suppression de TMR "Inconnu" pour signes
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
||||
@@ -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) } });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user