XP fix avec tooltip

This commit is contained in:
sladecraven 2021-01-14 15:29:47 +01:00
parent b69c515a7c
commit 4f236adbec
7 changed files with 119 additions and 23 deletions

View File

@ -46,8 +46,9 @@ export class RdDActorSheet extends ActorSheet {
data.itemsByType.competence, data.itemsByType.competence,
item => item.data.categorie, item => item.data.categorie,
item => { item => {
item.data.isLevelUp = item.data.xp >= RdDItemCompetence.getCompetenceNextXp(item.data.niveau); // Flag de niveau à MAJ item.data.xpNext = RdDItemCompetence.getCompetenceNextXp(item.data.niveau);
this.actor.checkCompetenceXP(item.name); // Petite vérification experience item.data.isLevelUp = item.data.xp >= item.data.xpNext; // Flag de niveau à MAJ
//this.actor.checkCompetenceXP(item.name); // Petite vérification experience
item.data.showCompetence = !data.data.showCompNiveauBase || (Number(item.data.niveau) != Number(RdDUtility.getLevelCategory(item.data.categorie))); item.data.showCompetence = !data.data.showCompNiveauBase || (Number(item.data.niveau) != Number(RdDUtility.getLevelCategory(item.data.categorie)));
// Ignorer les compétences 'troncs' à ce stade // Ignorer les compétences 'troncs' à ce stade
competenceXPTotal += RdDItemCompetence.isTronc(item.name) ? 0 : RdDItemCompetence.computeCompetenceXPCost(item); competenceXPTotal += RdDItemCompetence.isTronc(item.name) ? 0 : RdDItemCompetence.computeCompetenceXPCost(item);
@ -63,7 +64,8 @@ export class RdDActorSheet extends ActorSheet {
if (!currentCarac.derivee) { if (!currentCarac.derivee) {
sum += parseInt(currentCarac.value); sum += parseInt(currentCarac.value);
} }
currentCarac.isLevelUp = (currentCarac.xp >= RdDUtility.getCaracNextXp(currentCarac.value)); currentCarac.xpNext = RdDUtility.getCaracNextXp(currentCarac.value);
currentCarac.isLevelUp = (currentCarac.xp >= currentCarac.xpNext);
} }
data.data.caracSum = sum; data.data.caracSum = sum;
@ -512,7 +514,6 @@ export class RdDActorSheet extends ActorSheet {
/* -------------------------------------------- */ /* -------------------------------------------- */
/** @override */ /** @override */
setPosition(options = {}) { setPosition(options = {}) {
const position = super.setPosition(options); const position = super.setPosition(options);
@ -524,7 +525,6 @@ export class RdDActorSheet extends ActorSheet {
/* -------------------------------------------- */ /* -------------------------------------------- */
/** @override */ /** @override */
_updateObject(event, formData) { _updateObject(event, formData) {
// Update the Actor // Update the Actor

View File

@ -621,6 +621,7 @@ export class RdDActor extends Actor {
async updateCompetenceXP(compName, compValue) { async updateCompetenceXP(compName, compValue) {
let comp = this.getCompetence(compName); let comp = this.getCompetence(compName);
if (comp) { if (comp) {
this.checkCompetenceXP(compName, compValue);
const update = { _id: comp._id, 'data.xp': compValue }; const update = { _id: comp._id, 'data.xp': compValue };
const updated = await this.updateEmbeddedEntity("OwnedItem", update); // Updates one EmbeddedEntity const updated = await this.updateEmbeddedEntity("OwnedItem", update); // Updates one EmbeddedEntity
} else { } else {
@ -1461,13 +1462,18 @@ export class RdDActor extends Actor {
} }
/* -------------------------------------------- */ /* -------------------------------------------- */
async checkCompetenceXP(compName) { async checkCompetenceXP(compName, newXP = undefined) {
let competence = RdDItemCompetence.findCompetence(this.data.items, compName); let competence = RdDItemCompetence.findCompetence(this.data.items, compName);
if (competence && competence.data.xp > 0) { if ( competence && newXP && newXP == competence.data.xp ) { // Si édition, mais sans changement XP
return;
}
newXP = (newXP) ? newXP : competence.data.xp;
if (competence && newXP > 0) {
let xpNeeded = RdDItemCompetence.getCompetenceNextXp(competence.data.niveau); let xpNeeded = RdDItemCompetence.getCompetenceNextXp(competence.data.niveau);
if (competence.data.xp >= xpNeeded) { if (newXP >= xpNeeded) {
let newCompetence = duplicate(competence); let newCompetence = duplicate(competence);
newCompetence.data.niveau += 1; newCompetence.data.niveau += 1;
newCompetence.data.xp = newXP;
let xpData = { let xpData = {
alias: this.name, alias: this.name,
@ -2698,4 +2704,12 @@ export class RdDActor extends Actor {
await this.createEmbeddedEntity('ActiveEffect', effet, options); await this.createEmbeddedEntity('ActiveEffect', effet, options);
this.applyActiveEffects(); this.applyActiveEffects();
} }
/* -------------------------------------------- */
async updateEmbeddedEntity(embeddedName, data, options) {
if ( data && data['data.defaut_carac'] && data['data.xp'] ) { // C'est une compétence
this.checkCompetenceXP(data['name'], data['data.xp'] );
}
return super.updateEmbeddedEntity(embeddedName, data, options);
}
} }

View File

@ -121,7 +121,6 @@ export class RdDItemSheet extends ItemSheet {
/** @override */ /** @override */
_updateObject(event, formData) { _updateObject(event, formData) {
// Données de bonus de cases ? // Données de bonus de cases ?
formData = RdDItemSort.buildBonusCaseStringFromFormData( formData ); formData = RdDItemSort.buildBonusCaseStringFromFormData( formData );

View File

@ -362,7 +362,7 @@ export class RdDUtility {
//console.log("OBJ:", objet); //console.log("OBJ:", objet);
let str = Handlebars.partials['systems/foundryvtt-reve-de-dragon/templates/actor-inventaire-conteneur.html']({ item: objet }); let str = Handlebars.partials['systems/foundryvtt-reve-de-dragon/templates/actor-inventaire-conteneur.html']({ item: objet });
if (objet.type == 'conteneur') { if (objet.type == 'conteneur') {
console.log("ITEM DISPLAYED", objet ); //console.log("ITEM DISPLAYED", objet );
if (this.getAfficheContenu(objet._id)) { if (this.getAfficheContenu(objet._id)) {
str = str + "<ul class='item-list alterne-list item-display-show list-item-margin" + niveau + "'>"; str = str + "<ul class='item-list alterne-list item-display-show list-item-margin" + niveau + "'>";
} else { } else {

View File

@ -1297,6 +1297,17 @@ display: inline-flex;
padding: 3px 0; padding: 3px 0;
} }
.tooltip-nobottom {
border-bottom: unset; /* If you want dots under the hoverable text */
}
.tooltip .ttt-xp {
width: 250px;
background: rgba(220,220,210,0.95);
border-radius: 6px;
font-size: 0.9rem;
padding: 3px 0;
}
/* Show the tooltip text when you mouse over the tooltip container */ /* Show the tooltip text when you mouse over the tooltip container */
.tooltip:hover .tooltiptext { .tooltip:hover .tooltiptext {
visibility: visible; visibility: visible;

View File

@ -2,7 +2,7 @@
"name": "foundryvtt-reve-de-dragon", "name": "foundryvtt-reve-de-dragon",
"title": "Rêve de Dragon", "title": "Rêve de Dragon",
"description": "Rêve de Dragon RPG for FoundryVTT", "description": "Rêve de Dragon RPG for FoundryVTT",
"version": "1.2.19", "version": "1.2.20",
"manifestPlusVersion": "1.0.0", "manifestPlusVersion": "1.0.0",
"minimumCoreVersion": "0.7.5", "minimumCoreVersion": "0.7.5",
"compatibleCoreVersion": "0.7.8", "compatibleCoreVersion": "0.7.8",

View File

@ -132,7 +132,15 @@
<label class="competence-value flexrow">{{carac.value}}</label> <label class="competence-value flexrow">{{carac.value}}</label>
<label class="carac-xp flexrow"/> <label class="carac-xp flexrow"/>
{{else}} {{else}}
<span class="carac-label flexrow" name="data.carac.{{key}}.label"><a name={{key}}>{{carac.label}}</a></span> {{#if carac.isLevelUp}}
<span class="carac-label flexrow tooltip tooltip-nobottom" name="data.carac.{{key}}.label">
<span class="tooltiptext ttt-xp">
Vous pouvez dépenser {{carac.xpNext}} points d'Experience pour augmenter de 1 votre caractéristique {{carac.label}}
</span>
<a name={{key}}>{{carac.label}}</a></span>
{{else}}
<span class="carac-label flexrow tooltip tooltip-nobottom" name="data.carac.{{key}}.label"><a name={{key}}>{{carac.label}}</a></span>
{{/if}}
<input class="carac-value flexrow" type="text" name="data.carac.{{key}}.value" value="{{carac.value}}" data-dtype="{{carac.type}}" {{#unless @root.data.editCaracComp}}disabled{{/unless}} /> <input class="carac-value flexrow" type="text" name="data.carac.{{key}}.value" value="{{carac.value}}" data-dtype="{{carac.type}}" {{#unless @root.data.editCaracComp}}disabled{{/unless}} />
<input class="carac-xp flexrow" type="text" name="data.carac.{{key}}.xp" value="{{carac.xp}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}} /> <input class="carac-xp flexrow" type="text" name="data.carac.{{key}}.xp" value="{{carac.xp}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}} />
{{/if}} {{/if}}
@ -228,7 +236,15 @@
<li class="item flexrow list-item" data-item-id="{{comp._id}}"> <li class="item flexrow list-item" data-item-id="{{comp._id}}">
{{/if}} {{/if}}
<img class="sheet-competence-img" src="{{comp.img}}"/> <img class="sheet-competence-img" src="{{comp.img}}"/>
{{#if comp.data.isLevelUp}}
<span class="competence-label tooltip tooltip-nobottom">
<span class="tooltiptext ttt-xp">
Vous pouvez dépenser {{comp.data.xpNext}} points d'Experience pour augmenter de 1 votre compétence {{comp.name}}
</span>
<a name={{key}}>{{comp.name}}</a></span>
{{else}}
<span class="competence-label"><a>{{comp.name}}</a></span> <span class="competence-label"><a>{{comp.name}}</a></span>
{{/if}}
<input class="competence-value" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/> <input class="competence-value" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
<input class="competence-xp" type="text" compname="{{comp.name}}" value="{{comp.data.xp}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/> <input class="competence-xp" type="text" compname="{{comp.name}}" value="{{comp.data.xp}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
<div class="item-controls"> <div class="item-controls">
@ -255,7 +271,15 @@
<li class="item flexrow list-item" data-item-id="{{comp._id}}"> <li class="item flexrow list-item" data-item-id="{{comp._id}}">
{{/if}} {{/if}}
<img class="sheet-competence-img" src="{{comp.img}}"/> <img class="sheet-competence-img" src="{{comp.img}}"/>
{{#if comp.data.isLevelUp}}
<span class="competence-label tooltip tooltip-nobottom">
<span class="tooltiptext ttt-xp">
Vous pouvez dépenser {{comp.data.xpNext}} points d'Experience pour augmenter de 1 votre compétence {{comp.name}}
</span>
<a name={{key}}>{{comp.name}}</a></span>
{{else}}
<span class="competence-label"><a>{{comp.name}}</a></span> <span class="competence-label"><a>{{comp.name}}</a></span>
{{/if}}
<input class="competence-value" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/> <input class="competence-value" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
<input class="competence-xp" type="text" compname="{{comp.name}}" value="{{comp.data.xp}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/> <input class="competence-xp" type="text" compname="{{comp.name}}" value="{{comp.data.xp}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
<div class="item-controls"> <div class="item-controls">
@ -281,8 +305,16 @@
<li class="item flexrow list-item" data-item-id="{{comp._id}}"> <li class="item flexrow list-item" data-item-id="{{comp._id}}">
{{/if}} {{/if}}
<img class="sheet-competence-img" src="{{comp.img}}"/> <img class="sheet-competence-img" src="{{comp.img}}"/>
<span class="competence-label"><a>{{comp.name}}</a></span> {{#if comp.data.isLevelUp}}
<input class="competence-value" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/> <span class="competence-label tooltip tooltip-nobottom">
<span class="tooltiptext ttt-xp">
Vous pouvez dépenser {{comp.data.xpNext}} points d'Experience pour augmenter de 1 votre compétence {{comp.name}}
</span>
<a name={{key}}>{{comp.name}}</a></span>
{{else}}
<span class="competence-label"><a>{{comp.name}}</a></span>
{{/if}}
<input class="competence-value" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
<input class="competence-xp" type="text" compname="{{comp.name}}" value="{{comp.data.xp}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/> <input class="competence-xp" type="text" compname="{{comp.name}}" value="{{comp.data.xp}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
<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>
@ -310,8 +342,16 @@
<li class="item flexrow list-item" data-item-id="{{comp._id}}"> <li class="item flexrow list-item" data-item-id="{{comp._id}}">
{{/if}} {{/if}}
<img class="sheet-competence-img" src="{{comp.img}}"/> <img class="sheet-competence-img" src="{{comp.img}}"/>
{{#if comp.data.isLevelUp}}
<span class="competence-label tooltip tooltip-nobottom">
<span class="tooltiptext ttt-xp">
Vous pouvez dépenser {{comp.data.xpNext}} points d'Experience pour augmenter de 1 votre compétence {{comp.name}}
</span>
<a name={{key}}>{{comp.name}}</a></span>
{{else}}
<span class="competence-label"><a>{{comp.name}}</a></span> <span class="competence-label"><a>{{comp.name}}</a></span>
<input class="competence-value" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/> {{/if}}
<input class="competence-value" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
<input class="competence-xp" type="text" name="data.competenceByCategory.melee[{{key}}].data.xp" compname="{{comp.name}}" value="{{comp.data.xp}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/> <input class="competence-xp" type="text" name="data.competenceByCategory.melee[{{key}}].data.xp" compname="{{comp.name}}" value="{{comp.data.xp}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
<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>
@ -337,8 +377,16 @@
<li class="item flexrow list-item" data-item-id="{{comp._id}}"> <li class="item flexrow list-item" data-item-id="{{comp._id}}">
{{/if}} {{/if}}
<img class="sheet-competence-img" src="{{comp.img}}"/> <img class="sheet-competence-img" src="{{comp.img}}"/>
{{#if comp.data.isLevelUp}}
<span class="competence-label tooltip tooltip-nobottom">
<span class="tooltiptext ttt-xp">
Vous pouvez dépenser {{comp.data.xpNext}} points d'Experience pour augmenter de 1 votre compétence {{comp.name}}
</span>
<a name={{key}}>{{comp.name}}</a></span>
{{else}}
<span class="competence-label"><a>{{comp.name}}</a></span> <span class="competence-label"><a>{{comp.name}}</a></span>
<input class="competence-value" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/> {{/if}}
<input class="competence-value" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
<input class="competence-xp" type="text" name="data.competenceByCategory.tir[{{key}}].data.xp" compname="{{comp.name}}" value="{{comp.data.xp}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/> <input class="competence-xp" type="text" name="data.competenceByCategory.tir[{{key}}].data.xp" compname="{{comp.name}}" value="{{comp.data.xp}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
<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>
@ -364,8 +412,16 @@
<li class="item flexrow list-item" data-item-id="{{comp._id}}"> <li class="item flexrow list-item" data-item-id="{{comp._id}}">
{{/if}} {{/if}}
<img class="sheet-competence-img" src="{{comp.img}}"/> <img class="sheet-competence-img" src="{{comp.img}}"/>
{{#if comp.data.isLevelUp}}
<span class="competence-label tooltip tooltip-nobottom">
<span class="tooltiptext ttt-xp">
Vous pouvez dépenser {{comp.data.xpNext}} points d'Experience pour augmenter de 1 votre compétence {{comp.name}}
</span>
<a name={{key}}>{{comp.name}}</a></span>
{{else}}
<span class="competence-label"><a>{{comp.name}}</a></span> <span class="competence-label"><a>{{comp.name}}</a></span>
<input class="competence-value" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number"{{#unless @root.data.editCaracComp}}disabled{{/unless}}/> {{/if}}
<input class="competence-value" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number"{{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
<input class="competence-xp" type="text" name="data.competenceByCategory.lancer[{{key}}].data.xp" compname="{{comp.name}}" value="{{comp.data.xp}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/> <input class="competence-xp" type="text" name="data.competenceByCategory.lancer[{{key}}].data.xp" compname="{{comp.name}}" value="{{comp.data.xp}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
<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>
@ -391,8 +447,16 @@
<li class="item flexrow list-item" data-item-id="{{comp._id}}"> <li class="item flexrow list-item" data-item-id="{{comp._id}}">
{{/if}} {{/if}}
<img class="sheet-competence-img" src="{{comp.img}}"/> <img class="sheet-competence-img" src="{{comp.img}}"/>
{{#if comp.data.isLevelUp}}
<span class="competence-label tooltip tooltip-nobottom">
<span class="tooltiptext ttt-xp">
Vous pouvez dépenser {{comp.data.xpNext}} points d'Experience pour augmenter de 1 votre compétence {{comp.name}}
</span>
<a name={{key}}>{{comp.name}}</a></span>
{{else}}
<span class="competence-label"><a>{{comp.name}}</a></span> <span class="competence-label"><a>{{comp.name}}</a></span>
<input class="competence-value" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/> {{/if}}
<input class="competence-value" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
<input class="competence-xp" type="text" name="data.competenceByCategory.connaissance[{{key}}].data.xp" compname="{{comp.name}}" value="{{comp.data.xp}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/> <input class="competence-xp" type="text" name="data.competenceByCategory.connaissance[{{key}}].data.xp" compname="{{comp.name}}" value="{{comp.data.xp}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
<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>
@ -418,8 +482,16 @@
<li class="item flexrow list-item" data-item-id="{{comp._id}}"> <li class="item flexrow list-item" data-item-id="{{comp._id}}">
{{/if}} {{/if}}
<img class="sheet-competence-img" src="{{comp.img}}"/> <img class="sheet-competence-img" src="{{comp.img}}"/>
<span class="competence-label"><a>{{comp.name}}</a></span> {{#if comp.data.isLevelUp}}
<input class="competence-value" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/> <span class="competence-label tooltip tooltip-nobottom">
<span class="tooltiptext ttt-xp">
Vous pouvez dépenser {{comp.data.xpNext}} points d'Experience pour augmenter de 1 votre compétence {{comp.name}}
</span>
<a name={{key}}>{{comp.name}}</a></span>
{{else}}
<span class="competence-label"><a>{{comp.name}}</a></span>
{{/if}}
<input class="competence-value" type="text" compname="{{comp.name}}" value="{{numberFormat comp.data.niveau decimals=0 sign=true}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
<input class="competence-xp" type="text" name="data.competenceByCategory.draconic[{{key}}].data.xp" compname="{{comp.name}}" value="{{comp.data.xp}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/> <input class="competence-xp" type="text" name="data.competenceByCategory.draconic[{{key}}].data.xp" compname="{{comp.name}}" value="{{comp.data.xp}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
<input class="competence-xp-sort" type="text" name="data.competenceByCategory.draconic[{{key}}].data.xp_sort" compname="{{comp.name}}" value="{{comp.data.xp_sort}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/> <input class="competence-xp-sort" type="text" name="data.competenceByCategory.draconic[{{key}}].data.xp_sort" compname="{{comp.name}}" value="{{comp.data.xp_sort}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}}/>
<div class="item-controls"> <div class="item-controls">