Feat: Add sous-type field to Creature sheets (Créature, Démon, Automata)
- Add soustype field to CreatureDataModel - Add optionsSousTypeCreature to config with localization support - Add sous-type select dropdown to creature-sheet.hbs header - Add translation keys to fr.json Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
@@ -59,6 +59,8 @@
|
|||||||
"duration": "Durée",
|
"duration": "Durée",
|
||||||
"details": "Détails",
|
"details": "Détails",
|
||||||
"description": "Description",
|
"description": "Description",
|
||||||
|
"demon": "Démon",
|
||||||
|
"automata": "Automata",
|
||||||
"elementaires": "Élémentaires",
|
"elementaires": "Élémentaires",
|
||||||
"elementslords": "Seigneurs des Éléments",
|
"elementslords": "Seigneurs des Éléments",
|
||||||
"equipment": "Equipement",
|
"equipment": "Equipement",
|
||||||
|
|||||||
@@ -109,7 +109,8 @@ export default class CreatureDataModel extends foundry.abstract.TypeDataModel {
|
|||||||
// Spécifique aux créatures
|
// Spécifique aux créatures
|
||||||
ressources: new fields.SchemaField({
|
ressources: new fields.SchemaField({
|
||||||
value: new fields.NumberField({ initial: 0, integer: true })
|
value: new fields.NumberField({ initial: 0, integer: true })
|
||||||
})
|
}),
|
||||||
|
soustype: new fields.StringField({ initial: "" })
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -119,6 +119,12 @@ export const MOURNBLADECYD2_CONFIG = {
|
|||||||
{ key: "personnage", label: "Personnage" },
|
{ key: "personnage", label: "Personnage" },
|
||||||
{ key: "traitespece", label: "Trait d'espèce" }
|
{ key: "traitespece", label: "Trait d'espèce" }
|
||||||
],
|
],
|
||||||
|
optionsSousTypeCreature: [
|
||||||
|
{ key: "", label: localizeOrFallback("MNBL.none", "Aucun") },
|
||||||
|
{ key: "creature", label: localizeOrFallback("MNBL.creature", "Créature") },
|
||||||
|
{ key: "demon", label: localizeOrFallback("MNBL.demon", "Démon") },
|
||||||
|
{ key: "automata", label: localizeOrFallback("MNBL.automata", "Automata") }
|
||||||
|
],
|
||||||
|
|
||||||
// Configuration des ActiveEffects
|
// Configuration des ActiveEffects
|
||||||
effectTypes: {
|
effectTypes: {
|
||||||
|
|||||||
@@ -6,6 +6,12 @@
|
|||||||
<div class="header-banner">
|
<div class="header-banner">
|
||||||
<img class="profile-img" src="{{actor.img}}" data-action="editImage" title="{{actor.name}}" />
|
<img class="profile-img" src="{{actor.img}}" data-action="editImage" title="{{actor.name}}" />
|
||||||
<h1 class="charname"><input name="name" type="text" value="{{actor.name}}" placeholder="Nom de la créature" /></h1>
|
<h1 class="charname"><input name="name" type="text" value="{{actor.name}}" placeholder="Nom de la créature" /></h1>
|
||||||
|
<div class="header-subtitle">
|
||||||
|
<label>Sous-type: </label>
|
||||||
|
<select name="system.soustype">
|
||||||
|
{{selectOptions config.optionsSousTypeCreature selected=system.soustype valueAttr="key" nameAttr="key" labelAttr="label"}}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="header-stat-cards">
|
<div class="header-stat-cards">
|
||||||
|
|||||||
Reference in New Issue
Block a user