3 Commits

Author SHA1 Message Date
a30f813d94 Fix genre 2025-03-10 16:56:25 +01:00
090f6be601 Fix genre 2025-03-10 16:56:10 +01:00
60db1f65e4 Prit fix sur equipement et armes d'hast 2025-03-10 15:52:37 +01:00
25 changed files with 20 additions and 3 deletions

View File

@ -56,6 +56,7 @@ export class TeDeumActorPJSheet extends ActorSheet {
santeModifier: this.actor.getSanteModifier(),
educations: this.actor.getEducations(),
description: await TextEditor.enrichHTML(this.object.system.description, { async: true }),
equipmentfree: await TextEditor.enrichHTML(this.object.system.equipmentfree, { async: true }),
notes: await TextEditor.enrichHTML(this.object.system.notes, { async: true }),
histoire: await TextEditor.enrichHTML(this.object.system.histoire, { async: true }),
options: this.options,

View File

@ -630,7 +630,8 @@ export class TeDeumActor extends Actor {
// Setup competence + carac
if (!compName) {
compName = weapon.system.competence
let compIdx = weapon.system.competence
compName = game.system.tedeum.config.armeCompetences[compIdx]?.label
}
let competence = this.items.find(item => item.type == "competence" && item.name.toLowerCase() == compName.toLowerCase())
if (competence) {

View File

@ -117,6 +117,11 @@ export const TEDEUM_CONFIG = {
melee: { label: "Mêlée", value: "melee" },
tir: { label: "Tir", value: "tir" }
},
genreEducation: {
"homme": { label: "Homme", value: "homme" },
"femme": { label: "Femme", value: "femme" },
"mixte": { label: "Mixte", value: "mixte" }
},
armeAllonges: {
courte: { label: "Courte", value: "courte" },
moyenne: { label: "Moyenne", value: "moyenne" },

View File

@ -141,6 +141,7 @@ export class TeDeumUtility {
/*-------------------------------------------- */
static prepareEducationContent(formData) {
console.log("Etape:", formData.system.etape)
let etape = game.system.tedeum.config.etapesEducation[formData.system.etape]
let nbCompetences = etape.nbCompetences
for (let key in formData.system.competences) {

View File

@ -15,6 +15,8 @@ export class TeDeumEducationSchema extends foundry.abstract.TypeDataModel {
}, {})
);
schema.genre = new fields.StringField({required: true, initial: "masculin", choices: ["masculin", "feminin", "mixte"]});
schema.nbChoixCarac = new fields.NumberField({ ...requiredInteger, initial: 1, min: 1 });
schema.caracteristiques = new fields.SchemaField(Array.fromRange(3, 1).reduce((caracs, i) => {
caracs[`carac${i}`] = new fields.SchemaField({

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -335,7 +335,7 @@
<h3><label class="items-title-text">Zone libre</label></h3>
</span>
<div class="form-group small-editor">
{{editor equipementlibre target="system.equipmentfree" button=true owner=owner editable=editable}}
{{editor equipmentfree target="system.equipmentfree" button=true owner=owner editable=editable}}
</div>
<ul class="item-list alternate-list">
@ -348,7 +348,7 @@
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-add" data-type="equipment" title="Créer un équipement"><i
<a class="item-control item-add" data-type="equipement" title="Créer un équipement"><i
class="fas fa-plus"></i></a>
</div>

View File

@ -25,6 +25,13 @@
</select>
</li>
<li class="flexrow">
<label class="item-name-label-long">Genre</label>
<select name="system.genre">
{{selectOptions config.genreEducation selected=system.genre labelAttr="label" }}
</select>
</li>
{{#if hasMultiplier}}
{{else}}