Fix ouverture de conteneurs
This commit is contained in:
parent
969e5f6b2d
commit
0c36cf3c47
@ -54,7 +54,7 @@ export class RdDBaseActorSheet extends ActorSheet {
|
||||
notesmj: await TextEditor.enrichHTML(this.actor.system.notesmj, { async: true }),
|
||||
options: options,
|
||||
}
|
||||
this.filterItemsPerTypeForSheet(formData, this.actor.itemTypes);
|
||||
RdDBaseActorSheet.filterItemsPerTypeForSheet(formData, this.actor.itemTypes);
|
||||
formData.calc = {
|
||||
fortune: this.toSolsDeniers(this.actor.getFortune()),
|
||||
prixTotalEquipement: this.actor.computePrixTotalEquipement(),
|
||||
@ -76,7 +76,7 @@ export class RdDBaseActorSheet extends ActorSheet {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
filterItemsPerTypeForSheet(formData, itemTypes) {
|
||||
static filterItemsPerTypeForSheet(formData, itemTypes) {
|
||||
formData.recettescuisine = Misc.arrayOrEmpty(itemTypes['recettecuisine']);
|
||||
formData.recettesAlchimiques = Misc.arrayOrEmpty(itemTypes['recettealchimique']);
|
||||
formData.maladies = Misc.arrayOrEmpty(itemTypes['maladie']);
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { RdDBaseActorSheet } from "./actor/base-actor-sheet.js";
|
||||
import { RdDItemSheet } from "./item-sheet.js";
|
||||
import { RdDSheetUtility } from "./rdd-sheet-utility.js";
|
||||
import { RdDUtility } from "./rdd-utility.js";
|
||||
@ -27,7 +28,7 @@ export class RdDConteneurItemSheet extends RdDItemSheet {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
prepareConteneurData(formData) {
|
||||
RdDUtility.filterEquipementParType(formData, this.actor.itemTypes);
|
||||
RdDBaseActorSheet.filterItemsPerTypeForSheet(formData, this.actor.itemTypes);
|
||||
|
||||
this.objetVersConteneur = RdDUtility.buildArbreDeConteneurs(formData.conteneurs, formData.objets);
|
||||
formData.subItems = formData.conteneurs.find(it => it._id == this.item.id)?.subItems;
|
||||
|
Loading…
Reference in New Issue
Block a user