feat: gestion de l'expérience (XP)
- Schéma xp dans CelestopolCharacter : actuel (éditable), log[] ({montant, raison, date}), depense (calculé dans prepareDerivedData)
- Bouton 'Dépenser XP' → DialogV2 (montant + raison) : décrémente actuel, logge l'entrée
- Suppression d'entrée de log avec remboursement des points (mode édition)
- Section XP en haut de l'onglet Biographie : compteurs, tableau du log, référentiel des coûts
- i18n : section CELESTOPOL.XP.* complète
- CSS : .xp-section avec compteurs, tableau de log et accordéon de référence
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -13,32 +13,12 @@
|
||||
<td class="faction-value">
|
||||
<div class="faction-checkboxes-container">
|
||||
<div class="faction-checkboxes">
|
||||
{{#each (array 1 2 3 4 5 6 7 8 9) as |level|}}
|
||||
{{#if @root.isEditMode}}
|
||||
<label class="faction-checkbox-wrapper">
|
||||
<input type="checkbox" name="system.factions.{{factionId}}.level{{level}}"
|
||||
{{#if (lookup (lookup @root.system.factions factionId) (concat 'level' level))}}checked{{/if}}
|
||||
class="faction-checkbox"
|
||||
data-faction="{{factionId}}"
|
||||
data-level="{{level}}">
|
||||
</label>
|
||||
{{else}}
|
||||
<label class="faction-checkbox-wrapper">
|
||||
<input type="checkbox"
|
||||
{{#if (lookup (lookup @root.system.factions factionId) (concat 'level' level))}}checked{{/if}}
|
||||
disabled class="faction-checkbox">
|
||||
</label>
|
||||
{{/if}}
|
||||
{{#each (range 9) as |level|}}
|
||||
<span class="faction-dot {{#if (lte level (lookup @root.system.factions factionId 'value'))}}filled{{/if}}"
|
||||
{{#if @root.isEditable}}data-action="factionLevel" data-faction="{{factionId}}" data-index="{{level}}"{{/if}}></span>
|
||||
{{/each}}
|
||||
</div>
|
||||
<span class="faction-count">
|
||||
{{#if ../isEditMode}}
|
||||
<input type="number" name="system.factions.{{factionId}}.value"
|
||||
value="{{lookup (lookup ../system.factions factionId) 'value'}}" min="0" max="9" class="faction-value-input">
|
||||
{{else}}
|
||||
{{lookup (lookup ../system.factions factionId) 'value'}}
|
||||
{{/if}}
|
||||
</span>
|
||||
<span class="faction-count">{{lookup @root.system.factions factionId 'value'}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -58,32 +38,12 @@
|
||||
<td>
|
||||
<div class="faction-checkboxes-container">
|
||||
<div class="faction-checkboxes">
|
||||
{{#each (array 1 2 3 4 5 6 7 8 9) as |level|}}
|
||||
{{#if ../isEditMode}}
|
||||
<label class="faction-checkbox-wrapper">
|
||||
<input type="checkbox" name="system.factions.perso1.level{{level}}"
|
||||
{{#if (lookup ../system.factions.perso1 (concat 'level' level))}}checked{{/if}}
|
||||
class="faction-checkbox"
|
||||
data-faction="perso1"
|
||||
data-level="{{level}}">
|
||||
</label>
|
||||
{{else}}
|
||||
<label class="faction-checkbox-wrapper">
|
||||
<input type="checkbox"
|
||||
{{#if (lookup ../system.factions.perso1 (concat 'level' level))}}checked{{/if}}
|
||||
disabled class="faction-checkbox">
|
||||
</label>
|
||||
{{/if}}
|
||||
{{#each (range 9) as |level|}}
|
||||
<span class="faction-dot {{#if (lte level ../system.factions.perso1.value)}}filled{{/if}}"
|
||||
{{#if ../isEditable}}data-action="factionLevel" data-faction="perso1" data-index="{{level}}"{{/if}}></span>
|
||||
{{/each}}
|
||||
</div>
|
||||
<span class="faction-count">
|
||||
{{#if ../isEditMode}}
|
||||
<input type="number" name="system.factions.perso1.value"
|
||||
value="{{system.factions.perso1.value}}" min="0" max="9" class="faction-value-input">
|
||||
{{else}}
|
||||
{{system.factions.perso1.value}}
|
||||
{{/if}}
|
||||
</span>
|
||||
<span class="faction-count">{{system.factions.perso1.value}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -100,32 +60,12 @@
|
||||
<td>
|
||||
<div class="faction-checkboxes-container">
|
||||
<div class="faction-checkboxes">
|
||||
{{#each (array 1 2 3 4 5 6 7 8 9) as |level|}}
|
||||
{{#if ../isEditMode}}
|
||||
<label class="faction-checkbox-wrapper">
|
||||
<input type="checkbox" name="system.factions.perso2.level{{level}}"
|
||||
{{#if (lookup ../system.factions.perso2 (concat 'level' level))}}checked{{/if}}
|
||||
class="faction-checkbox"
|
||||
data-faction="perso2"
|
||||
data-level="{{level}}">
|
||||
</label>
|
||||
{{else}}
|
||||
<label class="faction-checkbox-wrapper">
|
||||
<input type="checkbox"
|
||||
{{#if (lookup ../system.factions.perso2 (concat 'level' level))}}checked{{/if}}
|
||||
disabled class="faction-checkbox">
|
||||
</label>
|
||||
{{/if}}
|
||||
{{#each (range 9) as |level|}}
|
||||
<span class="faction-dot {{#if (lte level ../system.factions.perso2.value)}}filled{{/if}}"
|
||||
{{#if ../isEditable}}data-action="factionLevel" data-faction="perso2" data-index="{{level}}"{{/if}}></span>
|
||||
{{/each}}
|
||||
</div>
|
||||
<span class="faction-count">
|
||||
{{#if ../isEditMode}}
|
||||
<input type="number" name="system.factions.perso2.value"
|
||||
value="{{system.factions.perso2.value}}" min="0" max="9" class="faction-value-input">
|
||||
{{else}}
|
||||
{{system.factions.perso2.value}}
|
||||
{{/if}}
|
||||
</span>
|
||||
<span class="faction-count">{{system.factions.perso2.value}}</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user