From 8f6f3823c6bd7775eaaf0749d779dec7010beb87 Mon Sep 17 00:00:00 2001 From: LeRatierBretonnier Date: Sun, 29 Mar 2026 17:28:52 +0200 Subject: [PATCH] =?UTF-8?q?Aspect=20:=20simplifi=C3=A9=20=C3=A0=20un=20seu?= =?UTF-8?q?l=20champ=20description?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- module/applications/sheets/item-sheets.mjs | 7 +-- module/models/items.mjs | 6 --- system.json | 5 +-- templates/aspect.hbs | 51 +++------------------- 4 files changed, 8 insertions(+), 61 deletions(-) diff --git a/module/applications/sheets/item-sheets.mjs b/module/applications/sheets/item-sheets.mjs index 9041b51..1f67efe 100644 --- a/module/applications/sheets/item-sheets.mjs +++ b/module/applications/sheets/item-sheets.mjs @@ -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 } } diff --git a/module/models/items.mjs b/module/models/items.mjs index 556959c..3d3c9c5 100644 --- a/module/models/items.mjs +++ b/module/models/items.mjs @@ -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 }), } } } diff --git a/system.json b/system.json index 505a62a..a6b0a36 100644 --- a/system.json +++ b/system.json @@ -70,10 +70,7 @@ }, "aspect": { "htmlFields": [ - "description", - "technique", - "narratif", - "notes" + "description" ] }, "equipment": { diff --git a/templates/aspect.hbs b/templates/aspect.hbs index a346ba5..d5a1722 100644 --- a/templates/aspect.hbs +++ b/templates/aspect.hbs @@ -5,54 +5,15 @@
-
-
- - {{#if isEditable}} - - {{else}} - {{system.value}} - {{/if}} -
-
- - -
-
-
-
{{localize "CELESTOPOL.Tab.description"}}
-
- {{formInput systemFields.description enriched=enrichedDescription value=system.description name="system.description" toggled=true}} -
+
+
+
{{localize "CELESTOPOL.Actor.description"}}
+
+ {{formInput systemFields.description enriched=enrichedDescription value=system.description name="system.description" toggled=true}}
-
- -
-
-
-
{{localize "CELESTOPOL.Item.technique"}}
-
- {{formInput systemFields.technique enriched=enrichedTechnique value=system.technique name="system.technique" toggled=true}} -
-
-
-
{{localize "CELESTOPOL.Item.narratif"}}
-
- {{formInput systemFields.narratif enriched=enrichedNarratif value=system.narratif name="system.narratif" toggled=true}} -
-
-
-
- -
- {{> "systems/fvtt-celestopol/templates/partials/item-scores.hbs" skills=skills system=system}} -
+