Aspect : simplifié à un seul champ description

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-03-29 17:28:52 +02:00
parent 7b2662bdd5
commit 8f6f3823c6
4 changed files with 8 additions and 61 deletions

View File

@@ -35,20 +35,15 @@ export class CelestopolAnomalySheet extends CelestopolItemSheet {
export class CelestopolAspectSheet extends CelestopolItemSheet {
static DEFAULT_OPTIONS = {
classes: ["aspect"],
position: { width: 620, height: 520 },
position: { width: 480, height: 360 },
}
static PARTS = {
main: { template: "systems/fvtt-celestopol/templates/aspect.hbs" },
}
async _prepareContext() {
const ctx = await super._prepareContext()
ctx.skills = SYSTEM.SKILLS
ctx.enrichedDescription = await foundry.applications.ux.TextEditor.implementation.enrichHTML(
this.document.system.description, { async: true })
ctx.enrichedTechnique = await foundry.applications.ux.TextEditor.implementation.enrichHTML(
this.document.system.technique, { async: true })
ctx.enrichedNarratif = await foundry.applications.ux.TextEditor.implementation.enrichHTML(
this.document.system.narratif, { async: true })
return ctx
}
}

View File

@@ -45,14 +45,8 @@ export class CelestopolAnomaly extends foundry.abstract.TypeDataModel {
export class CelestopolAspect extends foundry.abstract.TypeDataModel {
static defineSchema() {
const fields = foundry.data.fields
const reqInt = { required: true, nullable: false, integer: true }
return {
value: new fields.NumberField({ ...reqInt, initial: 0, min: 0, max: 8 }),
scores: skillScoresSchema(),
description: new fields.HTMLField({ required: true, textSearch: true }),
technique: new fields.HTMLField({ required: true, textSearch: true }),
narratif: new fields.HTMLField({ required: true, textSearch: true }),
notes: new fields.HTMLField({ required: true, textSearch: true }),
}
}
}