76ed974352
- Correction du libellé 'Coût en Âme' en 'Coût en points de pouvoir' pour les runes - Fix: Ajout des gestionnaires d'événements pour les automatisations des Talents - Ajout des actions addAutomation et deleteAutomation dans base-item-sheet.mjs - Ajout des attributs data-action sur les boutons du template partial-automation.hbs - Ajout des attributs name sur les champs d'automatisation pour la sauvegarde - Ajout de la catégorie 'Balance' dans les options d'allégeance pour Dons et Tendances Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
74 lines
4.4 KiB
Handlebars
74 lines
4.4 KiB
Handlebars
<li class="flexrow item">
|
|
<label class="generic-label item-field-label-long">Automatisation ? </label>
|
|
<input type="checkbox" name="system.isautomated" {{checked system.isautomated}} />
|
|
</li>
|
|
|
|
{{#if system.isautomated}}
|
|
<li class="flexrow item">
|
|
<ul>
|
|
{{#each system.automations as |automation key|}}
|
|
<li class="automation-item item flexrow">
|
|
<hr>
|
|
</li>
|
|
<li class="automation-item item flexrow" data-automation-field="eventtype" data-automation-index="{{key}}">
|
|
<label class="generic-label item-field-label-medium">Evènement</label>
|
|
<select class="item-field-label-long automation-edit-field" type="text" data-automation-index="{{key}}" data-automation-field="eventtype"
|
|
name="system.automations.{{key}}.eventtype" value="{{automation.eventtype}}" data-dtype="String">
|
|
{{selectOptions @root.config.optionsAutomationEvent selected=automation.eventtype valueAttr="key" nameAttr="key" labelAttr="label"}}
|
|
</select>
|
|
|
|
<label class="generic-label item-field-label-medium"> </label>
|
|
|
|
<a class="item-control item-field-label-medium delete-automation" title="Supprimer" data-automation-index="{{key}}" data-action="deleteAutomation"><i
|
|
class="fas fa-trash"></i></a>
|
|
|
|
</li>
|
|
|
|
{{#if (eq automation.eventtype "on-drop")}}
|
|
<li class="automation-item item flexrow">
|
|
<label class="generic-label item-field-label-long">Compétence/Attribut</label>
|
|
<input type="text" class="item-field-label-medium automation-edit-field" data-automation-index="{{key}}" data-automation-field="competence" name="system.automations.{{key}}.competence" value="{{automation.competence}}" data-dtype="String" />
|
|
</li>
|
|
<li class="automation-item item flexrow">
|
|
<label class="generic-label item-field-label-long">Valeur minimum</label>
|
|
<input type="text" class="item-field-label-medium automation-edit-field" data-automation-index="{{key}}" data-automation-field="minLevel" name="system.automations.{{key}}.minLevel" value="{{automation.minLevel}}" data-dtype="Number" />
|
|
</li>
|
|
{{/if}}
|
|
|
|
{{#if (eq automation.eventtype "bonus-permanent")}}
|
|
<li class="automation-item item flexrow">
|
|
<label class="generic-label item-field-label-long">Désignation</label>
|
|
<select class="item-field-label-long automation-edit-field" type="text" data-automation-index="{{key}}" data-automation-field="bonusname"
|
|
name="system.automations.{{key}}.bonusname" value="{{automation.bonusname}}" data-dtype="String">
|
|
{{selectOptions @root.config.optionsBonusPermanent selected=automation.bonusname valueAttr="key" nameAttr="key" labelAttr="label"}}
|
|
</select>
|
|
</li>
|
|
<li class="automation-item item flexrow">
|
|
<label class="generic-label item-field-label-long">Bonus</label>
|
|
<input type="text" class="item-field-label-medium automation-edit-field" data-automation-index="{{key}}" data-automation-field="bonus" name="system.automations.{{key}}.bonus" value="{{automation.bonus}}" data-dtype="Number" />
|
|
</li>
|
|
{{/if}}
|
|
|
|
{{#if (eq automation.eventtype "prepare-roll")}}
|
|
<li class="automation-item item flexrow">
|
|
<label class="generic-label item-field-label-long">Compétence/Attribut</label>
|
|
<input type="text" class="item-field-label-medium automation-edit-field" data-automation-index="{{key}}" data-automation-field="competence" name="system.automations.{{key}}.competence" value="{{automation.competence}}" data-dtype="String" />
|
|
</li>
|
|
<li class="automation-item item flexrow">
|
|
<label class="generic-label item-field-label-long">Bonus</label>
|
|
<input type="text" class="item-field-label-medium automation-edit-field" data-automation-index="{{key}}" data-automation-field="bonus" name="system.automations.{{key}}.bonus" value="{{automation.bonus}}" data-dtype="Number" />
|
|
</li>
|
|
<li class="automation-item item flexrow">
|
|
<label class="generic-label item-field-label-long">Coût en BA</label>
|
|
<input type="text" class="item-field-label-medium automation-edit-field" data-automation-index="{{key}}" data-automation-field="baCost" name="system.automations.{{key}}.baCost" value="{{automation.baCost}}" data-dtype="Number" />
|
|
</li>
|
|
{{/if}}
|
|
|
|
{{/each}}
|
|
|
|
</ul>
|
|
|
|
<li class="flexrow item">
|
|
<button id="add-automation" class="chat-card-button" data-action="addAutomation">Ajouter une automatisation</button>
|
|
</li>
|
|
{{/if}} |