diff --git a/fvtt-celestopol.mjs b/fvtt-celestopol.mjs index da3bc00..e21e224 100644 --- a/fvtt-celestopol.mjs +++ b/fvtt-celestopol.mjs @@ -9,7 +9,6 @@ import { CelestopolNPC, CelestopolAnomaly, CelestopolAspect, - CelestopolAttribute, CelestopolEquipment, } from "./module/models/_module.mjs" import { @@ -23,7 +22,6 @@ import { CelestopolNPCSheet, CelestopolAnomalySheet, CelestopolAspectSheet, - CelestopolAttributeSheet, CelestopolEquipmentSheet, } from "./module/applications/_module.mjs" @@ -42,7 +40,6 @@ Hooks.once("init", () => { CONFIG.Item.dataModels.anomaly = CelestopolAnomaly CONFIG.Item.dataModels.aspect = CelestopolAspect - CONFIG.Item.dataModels.attribute = CelestopolAttribute CONFIG.Item.dataModels.equipment = CelestopolEquipment // ── Document classes ──────────────────────────────────────────────────── @@ -88,11 +85,6 @@ Hooks.once("init", () => { makeDefault: true, label: "CELESTOPOL.Sheet.aspect", }) - foundry.documents.collections.Items.registerSheet(SYSTEM_ID, CelestopolAttributeSheet, { - types: ["attribute"], - makeDefault: true, - label: "CELESTOPOL.Sheet.attribute", - }) foundry.documents.collections.Items.registerSheet(SYSTEM_ID, CelestopolEquipmentSheet, { types: ["equipment"], makeDefault: true, @@ -204,7 +196,6 @@ function _preloadTemplates() { `${base}/npc-blessures.hbs`, `${base}/anomaly.hbs`, `${base}/aspect.hbs`, - `${base}/attribute.hbs`, `${base}/equipment.hbs`, `${base}/roll-dialog.hbs`, `${base}/chat-message.hbs`, diff --git a/lang/fr.json b/lang/fr.json index c390f0e..ef7393c 100644 --- a/lang/fr.json +++ b/lang/fr.json @@ -7,7 +7,6 @@ "Item": { "anomaly": "Anomalie", "aspect": "Aspect", - "attribute": "Attribut", "equipment": "Équipement" } }, @@ -170,11 +169,9 @@ "anomaly": "Anomalie", "anomalies": "Anomalies", "aspects": "Aspects", - "attributes": "Attributs", "equipments": "Équipements", "newAnomaly": "Nouvelle anomalie", "newAspect": "Nouvel aspect", - "newAttribute": "Nouvel attribut", "newEquipment": "Nouvel équipement", "value": "Valeur", "scores": "Scores bonus / malus", diff --git a/module/applications/_module.mjs b/module/applications/_module.mjs index ebb0911..fd3219e 100644 --- a/module/applications/_module.mjs +++ b/module/applications/_module.mjs @@ -1,3 +1,3 @@ export { default as CelestopolCharacterSheet } from "./sheets/character-sheet.mjs" export { default as CelestopolNPCSheet } from "./sheets/npc-sheet.mjs" -export { CelestopolAnomalySheet, CelestopolAspectSheet, CelestopolAttributeSheet, CelestopolEquipmentSheet } from "./sheets/item-sheets.mjs" +export { CelestopolAnomalySheet, CelestopolAspectSheet, CelestopolEquipmentSheet } from "./sheets/item-sheets.mjs" diff --git a/module/applications/sheets/character-sheet.mjs b/module/applications/sheets/character-sheet.mjs index 9d90a4e..94987ce 100644 --- a/module/applications/sheets/character-sheet.mjs +++ b/module/applications/sheets/character-sheet.mjs @@ -10,7 +10,6 @@ export default class CelestopolCharacterSheet extends CelestopolActorSheet { actions: { createAnomaly: CelestopolCharacterSheet.#onCreateAnomaly, createAspect: CelestopolCharacterSheet.#onCreateAspect, - createAttribute: CelestopolCharacterSheet.#onCreateAttribute, createEquipment: CelestopolCharacterSheet.#onCreateEquipment, useAnomaly: CelestopolCharacterSheet.#onUseAnomaly, resetAnomalyUses: CelestopolCharacterSheet.#onResetAnomalyUses, @@ -68,7 +67,6 @@ export default class CelestopolCharacterSheet extends CelestopolActorSheet { context.tab = context.tabs.competences context.anomaly = doc.itemTypes.anomaly[0] ?? null context.aspects = doc.itemTypes.aspect - context.attributes = doc.itemTypes.attribute if (context.anomaly) { const def = SYSTEM.ANOMALY_DEFINITIONS[context.anomaly.system.subtype] ?? SYSTEM.ANOMALY_DEFINITIONS.none context.anomalySkillLabels = def.technicalSkills.map(key => { @@ -120,12 +118,6 @@ export default class CelestopolCharacterSheet extends CelestopolActorSheet { }]) } - static #onCreateAttribute() { - this.document.createEmbeddedDocuments("Item", [{ - name: game.i18n.localize("CELESTOPOL.Item.newAttribute"), type: "attribute", - }]) - } - static #onCreateEquipment() { this.document.createEmbeddedDocuments("Item", [{ name: game.i18n.localize("CELESTOPOL.Item.newEquipment"), type: "equipment", diff --git a/module/applications/sheets/item-sheets.mjs b/module/applications/sheets/item-sheets.mjs index be5073b..70e969a 100644 --- a/module/applications/sheets/item-sheets.mjs +++ b/module/applications/sheets/item-sheets.mjs @@ -53,27 +53,6 @@ export class CelestopolAspectSheet extends CelestopolItemSheet { } } -export class CelestopolAttributeSheet extends CelestopolItemSheet { - static DEFAULT_OPTIONS = { - classes: ["attribute"], - position: { width: 620, height: 520 }, - } - static PARTS = { - main: { template: "systems/fvtt-celestopol/templates/attribute.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 - } -} - export class CelestopolEquipmentSheet extends CelestopolItemSheet { static DEFAULT_OPTIONS = { classes: ["equipment"], diff --git a/module/models/_module.mjs b/module/models/_module.mjs index 9afd95e..380cd65 100644 --- a/module/models/_module.mjs +++ b/module/models/_module.mjs @@ -1,3 +1,3 @@ export { default as CelestopolCharacter } from "./character.mjs" export { default as CelestopolNPC } from "./npc.mjs" -export { CelestopolAnomaly, CelestopolAspect, CelestopolAttribute, CelestopolEquipment } from "./items.mjs" +export { CelestopolAnomaly, CelestopolAspect, CelestopolEquipment } from "./items.mjs" diff --git a/module/models/items.mjs b/module/models/items.mjs index 2142e68..e9db670 100644 --- a/module/models/items.mjs +++ b/module/models/items.mjs @@ -1,6 +1,6 @@ import { SYSTEM } from "../config/system.mjs" -/** Schéma partagé pour les bonus/malus par domaine (utilisé dans anomaly/aspect/attribute). */ +/** Schéma partagé pour les bonus/malus par domaine (utilisé dans anomaly/aspect). */ function skillScoresSchema() { const fields = foundry.data.fields const reqInt = { required: true, nullable: false, integer: true } @@ -57,21 +57,6 @@ export class CelestopolAspect extends foundry.abstract.TypeDataModel { } } -export class CelestopolAttribute 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 }), - } - } -} - export class CelestopolEquipment extends foundry.abstract.TypeDataModel { static defineSchema() { const fields = foundry.data.fields diff --git a/system.json b/system.json index e77b9c5..6391324 100644 --- a/system.json +++ b/system.json @@ -42,9 +42,8 @@ } }, "Item": { - "anomaly": { "htmlFields": ["description", "technique", "narratif", "notes"] }, + "anomaly": { "htmlFields": ["technique", "narratif", "exemples"] }, "aspect": { "htmlFields": ["description", "technique", "narratif", "notes"] }, - "attribute": { "htmlFields": ["description", "technique", "narratif", "notes"] }, "equipment": { "htmlFields": ["description", "notes"] } } }, diff --git a/templates/attribute.hbs b/templates/attribute.hbs deleted file mode 100644 index 318461c..0000000 --- a/templates/attribute.hbs +++ /dev/null @@ -1,47 +0,0 @@ -