diff --git a/lang/fr.json b/lang/fr.json index d1e6b11..6de57cb 100644 --- a/lang/fr.json +++ b/lang/fr.json @@ -253,6 +253,9 @@ "protectionHint": "Réduit les blessures subies de ce montant", "malus": "Malus", "malusHint": "Malus aux tests de Mobilité et Discrétion (ou Domaine Corps pour PNJ)" + }, + "Aspect": { + "valeur": "Valeur" } } } \ No newline at end of file diff --git a/module/models/items.mjs b/module/models/items.mjs index 3d3c9c5..8fcbd0e 100644 --- a/module/models/items.mjs +++ b/module/models/items.mjs @@ -46,6 +46,7 @@ export class CelestopolAspect extends foundry.abstract.TypeDataModel { static defineSchema() { const fields = foundry.data.fields return { + valeur: new fields.NumberField({ required: true, integer: true, initial: 0, min: 0 }), description: new fields.HTMLField({ required: true, textSearch: true }), } } diff --git a/styles/items.less b/styles/items.less index 6141e31..a62286d 100644 --- a/styles/items.less +++ b/styles/items.less @@ -82,6 +82,29 @@ padding: 2px 4px; } + .item-header-valeur { + display: flex; + align-items: center; + gap: 6px; + label { + font-size: 0.8em; + color: var(--cel-orange-light); + text-transform: uppercase; + letter-spacing: 0.05em; + } + input[type="number"] { + width: 52px; + background: rgba(0,0,0,0.15); + border: 1px solid var(--cel-orange-light); + border-radius: 3px; + color: var(--cel-orange); + font-weight: bold; + font-size: 1em; + text-align: center; + padding: 1px 4px; + } + } + .item-meta { display: flex; gap: 8px; diff --git a/styles/mixins.less b/styles/mixins.less index 4e82966..30886b1 100644 --- a/styles/mixins.less +++ b/styles/mixins.less @@ -72,6 +72,13 @@ .item-name { flex: 1; font-style: italic; } + .item-value { + font-weight: bold; + min-width: 24px; + text-align: center; + color: var(--cel-green); + } + .item-controls { display: flex; gap: 4px; diff --git a/templates/aspect.hbs b/templates/aspect.hbs index d5a1722..52a7b61 100644 --- a/templates/aspect.hbs +++ b/templates/aspect.hbs @@ -5,6 +5,10 @@
+
+ + {{formInput systemFields.valeur value=system.valeur name="system.valeur"}} +
diff --git a/templates/character-competences.hbs b/templates/character-competences.hbs index 5e2be33..b588df3 100644 --- a/templates/character-competences.hbs +++ b/templates/character-competences.hbs @@ -145,7 +145,7 @@
{{item.name}} {{item.name}} - {{item.system.value}} + {{item.system.valeur}}
{{#if ../isEditMode}}{{/if}}