Gestion des blocs secrets dans les descriptions

This commit is contained in:
2025-01-11 02:19:56 +01:00
parent b87f406093
commit 7e736a00d7
7 changed files with 22 additions and 17 deletions

View File

@ -98,8 +98,8 @@ export class RdDItemSheet extends ItemSheet {
name: this.item.name,
system: this.item.system,
actorId: this.actor?.id,
description: await RdDTextEditor.enrichHTML(this.item.system.description),
descriptionmj: await RdDTextEditor.enrichHTML(this.item.system.descriptionmj),
description: await RdDTextEditor.enrichHTML(this.item.system.description, this.item),
descriptionmj: await RdDTextEditor.enrichHTML(this.item.system.descriptionmj, this.item),
isComestible: this.item.getUtilisationCuisine(),
options: RdDSheetUtility.mergeDocumentRights(this.options, this.item, this.isEditable),
competences: await SystemCompendiums.getCompetences(ACTOR_TYPES.personnage),
@ -121,18 +121,18 @@ export class RdDItemSheet extends ItemSheet {
formData.competences = formData.competences.filter(it => it.isCompetenceArme())
}
if (this.item.type == ITEM_TYPES.recettecuisine) {
formData.ingredients = await RdDTextEditor.enrichHTML(this.object.system.ingredients)
formData.ingredients = await RdDTextEditor.enrichHTML(this.item.system.ingredients, this.item)
}
if (this.item.type == ITEM_TYPES.extraitpoetique) {
formData.extrait = await RdDTextEditor.enrichHTML(this.object.system.extrait)
formData.texte = await RdDTextEditor.enrichHTML(this.object.system.texte)
formData.extrait = await RdDTextEditor.enrichHTML(this.item.system.extrait, this.item)
formData.texte = await RdDTextEditor.enrichHTML(this.item.system.texte, this.item)
}
if (this.item.type == ITEM_TYPES.recettealchimique) {
const manipulation = RdDAlchimie.processManipulation(this.item, this.actor?.id);
formData.manipulation = await RdDTextEditor.enrichHTML(manipulation)
formData.utilisation = await RdDTextEditor.enrichHTML(this.object.system.utilisation)
formData.enchantement = await RdDTextEditor.enrichHTML(this.object.system.enchantement)
formData.sureffet = await RdDTextEditor.enrichHTML(this.object.system.sureffet)
formData.manipulation = await RdDTextEditor.enrichHTML(manipulation, this.item)
formData.utilisation = await RdDTextEditor.enrichHTML(this.item.system.utilisation, this.item)
formData.enchantement = await RdDTextEditor.enrichHTML(this.item.system.enchantement, this.item)
formData.sureffet = await RdDTextEditor.enrichHTML(this.item.system.sureffet, this.item)
}
if (this.item.type == ITEM_TYPES.gemme) {
formData.gemmeTypeList = RdDGemme.getGemmeTypeOptionList();