fix de la config model pour select items et spécialité

This commit is contained in:
rwanoux
2024-11-23 11:52:41 +01:00
parent 9a4a3553d4
commit 1327f92f41
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -36,7 +36,8 @@ Hooks.once('init', async function () {
// Add custom constants for configuration. // Add custom constants for configuration.
CONFIG.VERMINE = VERMINE; CONFIG.VERMINE = VERMINE;
CONFIG.VERMINE.model = game.system.documentTypes CONFIG.VERMINE.model = game.system.template;
/** /**
* Set an initiative formula for the system * Set an initiative formula for the system
* @type {String} * @type {String}
+2 -1
View File
@@ -14,11 +14,12 @@
{{#if system.needSkill.value}} {{#if system.needSkill.value}}
<select name="system.needSkill.skill" class="skill-select"> <select name="system.needSkill.skill" class="skill-select">
<option value="">aucune</option> <option value="">aucune</option>
{{log config}}
{{#each @root.config.skillCategories as |skillCategory sckey|}} {{#each @root.config.skillCategories as |skillCategory sckey|}}
<optgroup label="{{ smarttlk 'SKILLS_CATEGORIES' sckey 'name' }}"> <optgroup label="{{ smarttlk 'SKILLS_CATEGORIES' sckey 'name' }}">
{{#each @root.config.model.Actor.character.skills as |skill key|}} {{#each @root.config.model.Actor.character.skills as |skill key|}}
{{#ife skill.category sckey}} {{#ife skill.category sckey}}
<option value="{{key}}" {{#ife key @root.system.needSkill.skill}} selected {{/ife}}>{{ smarttlk 'SKILLS' key 'name' }}</option> <option value="{{sckey}}" {{#ife sckey @root.system.needSkill.skill}} selected {{/ife}}>{{ smarttlk 'SKILLS' key 'name' }}</option>
{{/ife}} {{/ife}}
{{/each}} {{/each}}