Équipement : simplifié à un seul champ description

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-03-29 17:16:21 +02:00
parent 8b9c22ff4d
commit fb1fc1ef0d
4 changed files with 2 additions and 55 deletions

View File

@@ -63,7 +63,6 @@ export class CelestopolEquipmentSheet extends CelestopolItemSheet {
}
async _prepareContext() {
const ctx = await super._prepareContext()
ctx.equipmentTypes = SYSTEM.EQUIPMENT_TYPES
ctx.enrichedDescription = await foundry.applications.ux.TextEditor.implementation.enrichHTML(
this.document.system.description, { async: true })
return ctx

View File

@@ -60,19 +60,8 @@ export class CelestopolAspect extends foundry.abstract.TypeDataModel {
export class CelestopolEquipment extends foundry.abstract.TypeDataModel {
static defineSchema() {
const fields = foundry.data.fields
const reqInt = { required: true, nullable: false, integer: true }
return {
subtype: new fields.StringField({ required: true, nullable: false, initial: "autre",
choices: Object.keys(SYSTEM.EQUIPMENT_TYPES) }),
quantity: new fields.NumberField({ ...reqInt, initial: 1, min: 0 }),
weight: new fields.NumberField({ required: true, nullable: false, initial: 0, min: 0 }),
damage: new fields.StringField({ required: true, nullable: false, initial: "" }),
range: new fields.StringField({ required: true, nullable: false, initial: "" }),
speed: new fields.StringField({ required: true, nullable: false, initial: "" }),
protection: new fields.StringField({ required: true, nullable: false, initial: "" }),
crew: new fields.StringField({ required: true, nullable: false, initial: "" }),
description:new fields.HTMLField({ required: true, textSearch: true }),
notes: new fields.HTMLField({ required: true, textSearch: true }),
description: new fields.HTMLField({ required: true, textSearch: true }),
}
}
}