Align skills and caracs
This commit is contained in:
parent
04b67f2188
commit
c3d8f53c1b
@ -220,6 +220,7 @@ export class RdDUtility {
|
|||||||
Handlebars.registerHelper('caseTmr-type', coord => TMRUtility.getTMRType(coord));
|
Handlebars.registerHelper('caseTmr-type', coord => TMRUtility.getTMRType(coord));
|
||||||
Handlebars.registerHelper('typeTmr-name', coord => TMRUtility.typeTmrName(coord));
|
Handlebars.registerHelper('typeTmr-name', coord => TMRUtility.typeTmrName(coord));
|
||||||
Handlebars.registerHelper('equals', (a, b) => a == b);
|
Handlebars.registerHelper('equals', (a, b) => a == b);
|
||||||
|
Handlebars.registerHelper('sortCompetence', competences => competences.sort((a, b) => { return a.name.localeCompare(b.name); }) );
|
||||||
|
|
||||||
return loadTemplates(templatePaths);
|
return loadTemplates(templatePaths);
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<header class="competence-header flexrow">
|
<header class="competence-header flexrow">
|
||||||
<span class="competence-title">{{categorie}}</span>
|
<span class="competence-title">{{categorie}}</span>
|
||||||
</header>
|
</header>
|
||||||
<ul class="item-list alterne-list">
|
<ul class="item-list alterne-list competence-list">
|
||||||
{{#each competences as |comp key|}}
|
{{#each competences as |comp key|}}
|
||||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-competence-partial.html" comp}}
|
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-competence-partial.html" comp}}
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
@ -1,26 +1,19 @@
|
|||||||
{{#if visible}}
|
{{#if visible}}
|
||||||
{{#if data.isLevelUp}}
|
<li class="item flexrow list-item {{#if data.isLevelUp}}xp-level-up tooltip{{/if}}" data-item-id="{{_id}}">
|
||||||
<li class="item flexrow xp-level-up" data-item-id="{{_id}}">
|
|
||||||
{{else}}
|
|
||||||
<li class="item flexrow list-item" data-item-id="{{_id}}">
|
|
||||||
{{/if}}
|
|
||||||
<a class="competence-label" name="{{name}}">
|
<a class="competence-label" name="{{name}}">
|
||||||
<img class="sheet-competence-img" src="{{img}}" />
|
<img class="sheet-competence-img" src="{{img}}"/>
|
||||||
{{#if data.isLevelUp}}
|
|
||||||
<span class="competence-label tooltip">
|
|
||||||
<span class="tooltiptext ttt-xp">
|
|
||||||
Vous pouvez dépenser {{data.xpNext}} points d'Experience pour augmenter de 1 votre compétence {{name}}
|
|
||||||
</span>
|
|
||||||
{{name}}
|
|
||||||
</span>
|
|
||||||
{{else}}
|
|
||||||
<span class="competence-label">{{name}}</span>
|
<span class="competence-label">{{name}}</span>
|
||||||
{{/if}}
|
|
||||||
</a>
|
</a>
|
||||||
<input class="competence-value" type="text" compname="{{name}}" value="{{numberFormat data.niveau decimals=0 sign=true}}" data-dtype="number" {{#unless @root.options.editCaracComp}}disabled{{/unless}} />
|
<input class="competence-value" type="text" compname="{{name}}"
|
||||||
<input class="competence-xp" type="text" compname="{{name}}" value="{{numberFormat data.xp decimals=0 sign=false}}" data-dtype="number" {{#unless @root.options.editCaracComp}}disabled{{/unless}} />
|
value="{{numberFormat data.niveau decimals=0 sign=true}}" data-dtype="number"
|
||||||
|
{{#unless @root.options.editCaracComp}}disabled{{/unless}} />
|
||||||
|
<input class="competence-xp" type="text" compname="{{name}}"
|
||||||
|
value="{{numberFormat data.xp decimals=0 sign=false}}" data-dtype="number"
|
||||||
|
{{#unless @root.options.editCaracComp}}disabled{{/unless}} />
|
||||||
{{#if (eq data.categorie 'draconic')}}
|
{{#if (eq data.categorie 'draconic')}}
|
||||||
<input class="competence-xp-sort" type="text" compname="{{name}}" value="{{numberFormat data.xp_sort decimals=0 sign=false}}" data-dtype="number" {{#unless @root.options.editCaracComp}}disabled{{/unless}}/>
|
<input class="competence-xp-sort" type="text" compname="{{name}}"
|
||||||
|
value="{{numberFormat data.xp_sort decimals=0 sign=false}}" data-dtype="number"
|
||||||
|
{{#unless @root.options.editCaracComp}}disabled{{/unless}}/>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<div class="item-controls">
|
<div class="item-controls">
|
||||||
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
|
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
|
||||||
@ -28,7 +21,11 @@
|
|||||||
</div>
|
</div>
|
||||||
{{#if @root.options.montrerArchetype}}
|
{{#if @root.options.montrerArchetype}}
|
||||||
<input class="competence-archetype" type="text" compname="{{name}}"
|
<input class="competence-archetype" type="text" compname="{{name}}"
|
||||||
value="{{numberFormat data.niveau_archetype decimals=0 sign=true}}" data-dtype="number" {{#unless @root.options.editCaracComp}}disabled{{/unless}} />
|
value="{{numberFormat data.niveau_archetype decimals=0 sign=true}}" data-dtype="number"
|
||||||
|
{{#unless @root.options.editCaracComp}}disabled{{/unless}} />
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</li>
|
{{#if data.isLevelUp}}
|
||||||
|
<span class="tooltiptext ttt-xp">Vous pouvez dépenser {{data.xpNext}} points d'Experience pour augmenter de 1 votre compétence {{name}}</span>
|
||||||
|
{{/if}}
|
||||||
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
@ -233,18 +233,18 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="grid grid-2col">
|
<div class="grid grid-2col">
|
||||||
<div class="flex-group-left flexcol competence-column">
|
<div class="flex-group-left flexcol competence-column">
|
||||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=competenceByCategory.generale categorie="Compétences générales"}}
|
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=(sortCompetence competenceByCategory.generale) categorie="Compétences générales"}}
|
||||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=competenceByCategory.particuliere categorie="Compétences Particulières"}}
|
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=(sortCompetence competenceByCategory.particuliere) categorie="Compétences Particulières"}}
|
||||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=competenceByCategory.specialisee categorie="Compétences Spécialisées"}}
|
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=(sortCompetence competenceByCategory.specialisee) categorie="Compétences Spécialisées"}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex-group-left flexcol competence-column">
|
<div class="flex-group-left flexcol competence-column">
|
||||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=competenceByCategory.melee categorie="Compétences de Mêlée"}}
|
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=(sortCompetence competenceByCategory.melee) categorie="Compétences de Mêlée"}}
|
||||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=competenceByCategory.tir categorie="Compétences de Tir"}}
|
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=(sortCompetence competenceByCategory.tir) categorie="Compétences de Tir"}}
|
||||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=competenceByCategory.lancer categorie="Compétences de Lancer"}}
|
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=(sortCompetence competenceByCategory.lancer) categorie="Compétences de Lancer"}}
|
||||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=competenceByCategory.connaissance categorie="Connaissances"}}
|
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=(sortCompetence competenceByCategory.connaissance) categorie="Connaissances"}}
|
||||||
{{#if (or data.attributs.hautrevant.value options.montrerArchetype)}}
|
{{#if (or data.attributs.hautrevant.value options.montrerArchetype)}}
|
||||||
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=competenceByCategory.draconic categorie="Draconic"}}
|
{{> "systems/foundryvtt-reve-de-dragon/templates/actor-sheet-categorie-competences-partial.html" competences=(sortCompetence competenceByCategory.draconic) categorie="Draconic"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
Loading…
Reference in New Issue
Block a user