Compare commits
3 Commits
12.0.21
...
a30f813d94
Author | SHA1 | Date | |
---|---|---|---|
a30f813d94 | |||
090f6be601 | |||
60db1f65e4 |
@ -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,
|
||||
|
@ -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) {
|
||||
|
@ -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" },
|
||||
|
@ -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) {
|
||||
|
@ -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.
@ -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"> </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>
|
||||
|
||||
|
@ -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}}
|
||||
|
Reference in New Issue
Block a user