Fix sheets

This commit is contained in:
2024-12-10 07:25:55 +01:00
parent 4eb360252f
commit 27c420200e
32 changed files with 65 additions and 215 deletions

View File

@ -4,7 +4,6 @@ export { default as LethalFantasyWeaponSheet } from "./sheets/weapon-sheet.mjs"
export { default as LethalFantasySkillSheet } from "./sheets/skill-sheet.mjs"
export { default as LethalFantasyGiftSheet } from "./sheets/gift-sheet.mjs"
export { default as LethalFantasyVulnerabilitySheet } from "./sheets/vulnerability-sheet.mjs"
export { default as LethalFantasySaveSheet } from "./sheets/save-sheet.mjs"
export { default as LethalFantasyArmorSheet } from "./sheets/armor-sheet.mjs"
export { default as LethalFantasySpellSheet } from "./sheets/spell-sheet.mjs"
export { default as LethalFantasyEquipmentSheet } from "./sheets/equipment-sheet.mjs"

View File

@ -19,9 +19,12 @@ export default class LethalFantasyArmorSheet extends LethalFantasyItemSheet {
},
}
/** @override */
async _prepareContext() {
const context = await super._prepareContext()
context.enrichedDescription = await TextEditor.enrichHTML(this.document.system.description, { async: true })
return context
}
}

View File

@ -22,6 +22,7 @@ export default class LethalFantasyEquipmentSheet extends LethalFantasyItemSheet
/** @override */
async _prepareContext() {
const context = await super._prepareContext()
context.enrichedDescription = await TextEditor.enrichHTML(this.document.system.description, { async: true })
return context
}
}

View File

@ -18,4 +18,12 @@ export default class LethalFantasyMiracleSheet extends LethalFantasyItemSheet {
template: "systems/fvtt-lethal-fantasy/templates/miracle.hbs",
},
}
/** @override */
async _prepareContext() {
const context = await super._prepareContext()
context.enrichedDescription = await TextEditor.enrichHTML(this.document.system.description, { async: true })
return context
}
}

View File

@ -1,28 +0,0 @@
import LethalFantasyItemSheet from "./base-item-sheet.mjs"
export default class LethalFantasyGiftSheet extends LethalFantasyItemSheet {
/** @override */
static DEFAULT_OPTIONS = {
classes: ["save"],
position: {
width: 600,
},
window: {
contentClasses: ["save-content"],
},
}
/** @override */
static PARTS = {
main: {
template: "systems/fvtt-lethal-fantasy/templates/save.hbs",
},
}
/** @override */
async _prepareContext() {
const context = await super._prepareContext()
context.enrichedDescription = await TextEditor.enrichHTML(this.document.system.description, { async: true })
return context
}
}

View File

@ -22,6 +22,7 @@ export default class LethalFantasyShieldSheet extends LethalFantasyItemSheet {
/** @override */
async _prepareContext() {
const context = await super._prepareContext()
context.enrichedDescription = await TextEditor.enrichHTML(this.document.system.description, { async: true })
return context
}
}

View File

@ -18,4 +18,12 @@ export default class LethalFantasySpellSheet extends LethalFantasyItemSheet {
template: "systems/fvtt-lethal-fantasy/templates/spell.hbs",
},
}
/** @override */
async _prepareContext() {
const context = await super._prepareContext()
context.enrichedDescription = await TextEditor.enrichHTML(this.document.system.description, { async: true })
return context
}
}

View File

@ -18,4 +18,12 @@ export default class LethalFantasyWeaponSheet extends LethalFantasyItemSheet {
template: "systems/fvtt-lethal-fantasy/templates/weapon.hbs",
},
}
/** @override */
async _prepareContext() {
const context = await super._prepareContext()
context.enrichedDescription = await TextEditor.enrichHTML(this.document.system.description, { async: true })
return context
}
}