Various fixes - WIP
This commit is contained in:
parent
580fdb996b
commit
d83fd27193
@ -325,8 +325,8 @@ export class RdDActorSheet extends ActorSheet {
|
|||||||
|
|
||||||
// Roll Weapon1
|
// Roll Weapon1
|
||||||
html.find('.arme-label a').click(async event => {
|
html.find('.arme-label a').click(async event => {
|
||||||
let arme = this._getEventArmeCombat(event);
|
let arme = this._getEventArmeCombat(event)
|
||||||
this.actor.rollArme(duplicate(arme));
|
this.actor.rollArme(duplicate(arme))
|
||||||
});
|
});
|
||||||
// Initiative pour l'arme
|
// Initiative pour l'arme
|
||||||
html.find('.arme-initiative a').click(async event => {
|
html.find('.arme-initiative a').click(async event => {
|
||||||
@ -517,6 +517,7 @@ export class RdDActorSheet extends ActorSheet {
|
|||||||
const li = $(event.currentTarget)?.parents(".item")
|
const li = $(event.currentTarget)?.parents(".item")
|
||||||
let armeName = li.data("arme-name")
|
let armeName = li.data("arme-name")
|
||||||
let compName = li.data('competence-name')
|
let compName = li.data('competence-name')
|
||||||
|
console.log("Searching for", armeName, compName)
|
||||||
const arme = this.armesList.find(a => a.name == armeName && a.system.competence == compName)
|
const arme = this.armesList.find(a => a.name == armeName && a.system.competence == compName)
|
||||||
if (!arme) {
|
if (!arme) {
|
||||||
return { name: armeName, data: { competence: compName } }
|
return { name: armeName, data: { competence: compName } }
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
{{#if data.isLevelUp}}
|
{{#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>
|
<span class="tooltiptext ttt-xp">Vous pouvez dépenser {{system.xpNext}} points d'Experience pour augmenter de 1 votre compétence {{name}}</span>
|
||||||
<a class="item-control competence-xp-augmenter" compname="{{name}}" title="Augmenter">
|
<a class="item-control competence-xp-augmenter" compname="{{name}}" title="Augmenter">
|
||||||
<i class="fas fa-arrow-alt-circle-up"></i>
|
<i class="fas fa-arrow-alt-circle-up"></i>
|
||||||
</a>
|
</a>
|
||||||
@ -18,19 +18,19 @@
|
|||||||
|
|
||||||
<span class="competence-xp tooltip">
|
<span class="competence-xp tooltip">
|
||||||
<input class="competence-xp " type="text" compname="{{name}}" name="comp-xp-{{name}}"
|
<input class="competence-xp " type="text" compname="{{name}}" name="comp-xp-{{name}}"
|
||||||
value="{{numberFormat data.xp decimals=0 sign=false}}" data-dtype="number"
|
value="{{numberFormat system.xp decimals=0 sign=false}}" data-dtype="number"
|
||||||
{{#unless @root.options.editCaracComp}}disabled{{/unless}} />
|
{{#unless @root.options.editCaracComp}}disabled{{/unless}} />
|
||||||
<span class="tooltiptext left-competence ttt-xp">Vous devez acquérir {{data.xpNext}} points d'Experience pour augmenter de 1 votre compétence {{name}}</span>
|
<span class="tooltiptext left-competence ttt-xp">Vous devez acquérir {{system.xpNext}} points d'Experience pour augmenter de 1 votre compétence {{name}}</span>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
{{#if (eq data.categorie 'draconic')}}
|
{{#if (eq system.categorie 'draconic')}}
|
||||||
<input class="competence-xp-sort" type="text" compname="{{name}}" name="comp-xp-sort-{{name}}"
|
<input class="competence-xp-sort" type="text" compname="{{name}}" name="comp-xp-sort-{{name}}"
|
||||||
value="{{numberFormat data.xp_sort decimals=0 sign=false}}" data-dtype="number"
|
value="{{numberFormat system.xp_sort decimals=0 sign=false}}" data-dtype="number"
|
||||||
{{#unless @root.options.editCaracComp}}disabled{{/unless}}/>
|
{{#unless @root.options.editCaracComp}}disabled{{/unless}}/>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if @root.options.vueDetaillee}}
|
{{#if @root.options.vueDetaillee}}
|
||||||
<div class="item-controls">
|
<div class="item-controls">
|
||||||
{{#if data.stressXpMax}}
|
{{#if system.stressXpMax}}
|
||||||
<a class="item-control competence-stress-augmenter" compname="{{name}}"
|
<a class="item-control competence-stress-augmenter" compname="{{name}}"
|
||||||
title="Dépenser {{data.stressXpMax}} points de stress {{#if data.isStressLevelUp}} pour augmenter d'un niveau {{/if}}">
|
title="Dépenser {{data.stressXpMax}} points de stress {{#if data.isStressLevelUp}} pour augmenter d'un niveau {{/if}}">
|
||||||
<i class="fas fa-arrow-alt-circle-up allouer-stress{{#if data.isStressLevelUp}}-level-up{{/if}}"></i>
|
<i class="fas fa-arrow-alt-circle-up allouer-stress{{#if data.isStressLevelUp}}-level-up{{/if}}"></i>
|
||||||
@ -39,7 +39,7 @@
|
|||||||
<i class="far fa-circle"></i>
|
<i class="far fa-circle"></i>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<input class="competence-archetype niveau-archetype" type="text" compname="{{name}}" name="comp-archetype-{{name}}"
|
<input class="competence-archetype niveau-archetype" type="text" compname="{{name}}" name="comp-archetype-{{name}}"
|
||||||
value="{{numberFormat data.niveau_archetype decimals=0 sign=true}}" data-dtype="number"
|
value="{{numberFormat system.niveau_archetype decimals=0 sign=true}}" data-dtype="number"
|
||||||
{{#unless @root.options.editCaracComp}}disabled{{/unless}} />
|
{{#unless @root.options.editCaracComp}}disabled{{/unless}} />
|
||||||
<a class="item-control item-edit" title="Modifier"><i class="fas fa-edit"></i></a>
|
<a class="item-control item-edit" title="Modifier"><i class="fas fa-edit"></i></a>
|
||||||
{{#if @root.options.isGM}}
|
{{#if @root.options.isGM}}
|
||||||
|
@ -286,7 +286,7 @@
|
|||||||
</li>
|
</li>
|
||||||
{{#each combat as |arme key|}}
|
{{#each combat as |arme key|}}
|
||||||
<li class="item flexrow list-item" data-item-id="{{arme._id}}"
|
<li class="item flexrow list-item" data-item-id="{{arme._id}}"
|
||||||
data-arme-name="{{arme.name}}" data-competence-name="{{arme.data.competence}}" >
|
data-arme-name="{{arme.name}}" data-competence-name="{{arme.system.competence}}" >
|
||||||
<span class="arme-label">
|
<span class="arme-label">
|
||||||
<a>
|
<a>
|
||||||
{{#if arme.img}}
|
{{#if arme.img}}
|
||||||
@ -295,10 +295,10 @@
|
|||||||
<span>{{arme.name}}</span>
|
<span>{{arme.name}}</span>
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
<span class="arme-initiative"><a>{{arme.data.initiative}}</a></span>
|
<span class="arme-initiative"><a>{{arme.system.initiative}}</a></span>
|
||||||
<span class="competence-label">{{arme.data.competence}}</span>
|
<span class="competence-label">{{arme.system.competence}}</span>
|
||||||
<span class="competence-value">{{numberFormat arme.data.niveau decimals=0 sign=true}}</span>
|
<span class="competence-value">{{numberFormat arme.system.niveau decimals=0 sign=true}}</span>
|
||||||
<span class="competence-value">{{numberFormat arme.data.dommagesReels decimals=0 sign=true}}</span>
|
<span class="competence-value">{{numberFormat arme.system.dommagesReels decimals=0 sign=true}}</span>
|
||||||
</li>
|
</li>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
{{#each esquives as |esq key|}}
|
{{#each esquives as |esq key|}}
|
||||||
@ -312,7 +312,7 @@
|
|||||||
</span>
|
</span>
|
||||||
<span class="arme-initiative"></span>
|
<span class="arme-initiative"></span>
|
||||||
<span class="competence-label"></span>
|
<span class="competence-label"></span>
|
||||||
<span class="competence-value">{{numberFormat esq.data.niveau decimals=0 sign=true}}</span>
|
<span class="competence-value">{{numberFormat esq.system.niveau decimals=0 sign=true}}</span>
|
||||||
<span class="competence-value"></span>
|
<span class="competence-value"></span>
|
||||||
</li>
|
</li>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
@ -334,7 +334,7 @@
|
|||||||
{{#each maladiesPoisons as |maladie key|}}
|
{{#each maladiesPoisons as |maladie key|}}
|
||||||
<li class="item flexrow list-item" data-item-id="{{maladie._id}}">
|
<li class="item flexrow list-item" data-item-id="{{maladie._id}}">
|
||||||
<span class="competence-label">
|
<span class="competence-label">
|
||||||
{{#if (or @root.options.isGM maladie.data.identifie)}}
|
{{#if (or @root.options.isGM maladie.system.identifie)}}
|
||||||
{{maladie.name}}
|
{{maladie.name}}
|
||||||
{{else}}
|
{{else}}
|
||||||
Inconnue
|
Inconnue
|
||||||
@ -342,8 +342,8 @@
|
|||||||
</span>
|
</span>
|
||||||
<span class="competence-label">{{maladie.type}}</span>
|
<span class="competence-label">{{maladie.type}}</span>
|
||||||
<span class="competence-label">
|
<span class="competence-label">
|
||||||
{{#if (or @root.options.isGM maladie.data.remedesconnus)}}
|
{{#if (or @root.options.isGM maladie.system.remedesconnus)}}
|
||||||
{{maladie.data.remedes}}
|
{{maladie.system.remedes}}
|
||||||
{{else}}
|
{{else}}
|
||||||
Remèdes Inconnus
|
Remèdes Inconnus
|
||||||
{{/if}}
|
{{/if}}
|
||||||
@ -368,7 +368,7 @@
|
|||||||
<span class="competence-label">
|
<span class="competence-label">
|
||||||
{{possession.name}}
|
{{possession.name}}
|
||||||
</span>
|
</span>
|
||||||
<span class="competence-label">{{possession.data.type}}</span>
|
<span class="competence-label">{{possession.system.type}}</span>
|
||||||
<div class="item-controls">
|
<div class="item-controls">
|
||||||
<a class="item-control item-edit" title="Modifier"><i class="fas fa-edit"></i></a>
|
<a class="item-control item-edit" title="Modifier"><i class="fas fa-edit"></i></a>
|
||||||
<a class="item-control item-delete" title="Supprimer"><i class="fas fa-trash"></i></a>
|
<a class="item-control item-delete" title="Supprimer"><i class="fas fa-trash"></i></a>
|
||||||
@ -385,9 +385,9 @@
|
|||||||
<ul class="item-list alterne-list">
|
<ul class="item-list alterne-list">
|
||||||
{{#each taches as |tache id|}}
|
{{#each taches as |tache id|}}
|
||||||
<li class="item flexrow list-item" data-item-id="{{tache._id}}"><span class="competence-title tache-label"><a>{{tache.name}}
|
<li class="item flexrow list-item" data-item-id="{{tache._id}}"><span class="competence-title tache-label"><a>{{tache.name}}
|
||||||
({{tache.data.points_de_tache_courant}}{{#if
|
({{tache.system.points_de_tache_courant}}{{#if
|
||||||
(or @root.options.isGM (not tache.data.cacher_points_de_tache))
|
(or @root.options.isGM (not tache.system.cacher_points_de_tache))
|
||||||
}}/{{tache.data.points_de_tache}}{{/if}})</a></span>
|
}}/{{tache.system.points_de_tache}}{{/if}})</a></span>
|
||||||
<div class="item-controls flex-shrink">
|
<div class="item-controls flex-shrink">
|
||||||
<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>
|
||||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||||
@ -417,7 +417,7 @@
|
|||||||
<h3>Jeux :</h3>
|
<h3>Jeux :</h3>
|
||||||
<ul class="item-list alterne-list">
|
<ul class="item-list alterne-list">
|
||||||
{{#each jeux as |jeu id|}}
|
{{#each jeux as |jeu id|}}
|
||||||
<li class="item flexrow list-item" data-item-id="{{jeu._id}}"><span class="competence-title jeu-label"><a>{{jeu.name}} (base {{jeu.data.base}})</a></span>
|
<li class="item flexrow list-item" data-item-id="{{jeu._id}}"><span class="competence-title jeu-label"><a>{{jeu.name}} (base {{jeu.system.base}})</a></span>
|
||||||
<div class="item-controls flex-shrink">
|
<div class="item-controls flex-shrink">
|
||||||
<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>
|
||||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||||
@ -516,7 +516,7 @@
|
|||||||
{{#each signesdraconiques as |signe key|}}
|
{{#each signesdraconiques as |signe key|}}
|
||||||
<li class="item list-item flexrow" data-item-id="{{signe._id}}" data-attribute="{{key}}">
|
<li class="item list-item flexrow" data-item-id="{{signe._id}}" data-attribute="{{key}}">
|
||||||
<span class="display-label flex-grow"> <a data-item-id="{{signe._id}}">{{signe.name}}</a></span>
|
<span class="display-label flex-grow"> <a data-item-id="{{signe._id}}">{{signe.name}}</a></span>
|
||||||
<span class="flex-shrink">{{signe.data.difficulte}}</span>
|
<span class="flex-shrink">{{signe.system.difficulte}}</span>
|
||||||
<div class="item-controls flex-shrink">
|
<div class="item-controls flex-shrink">
|
||||||
<a class="item-control item-delete" title="Supprimer"><i class="fas fa-trash"></i></a>
|
<a class="item-control item-delete" title="Supprimer"><i class="fas fa-trash"></i></a>
|
||||||
</div>
|
</div>
|
||||||
@ -529,7 +529,7 @@
|
|||||||
{{#each sorts as |sort key|}}
|
{{#each sorts as |sort key|}}
|
||||||
<li class="item list-item flexrow" data-item-id="{{sort._id}}" data-attribute="{{key}}">
|
<li class="item list-item flexrow" data-item-id="{{sort._id}}" data-attribute="{{key}}">
|
||||||
<span class="display-label flex-grow"> <a data-item-id="{{sort._id}}">{{sort.name}}</a></span>
|
<span class="display-label flex-grow"> <a data-item-id="{{sort._id}}">{{sort.name}}</a></span>
|
||||||
<span>{{sort.data.draconic}} / {{sort.data.difficulte}}</span>
|
<span>{{sort.system.draconic}} / {{sort.system.difficulte}}</span>
|
||||||
<div class="item-controls flex-shrink">
|
<div class="item-controls flex-shrink">
|
||||||
<a class="item-control item-delete" title="Supprimer"><i class="fas fa-trash"></i></a>
|
<a class="item-control item-delete" title="Supprimer"><i class="fas fa-trash"></i></a>
|
||||||
</div>
|
</div>
|
||||||
@ -557,7 +557,7 @@
|
|||||||
<ul class="item-list">
|
<ul class="item-list">
|
||||||
{{#each meditations as |meditation key|}}
|
{{#each meditations as |meditation key|}}
|
||||||
<li class="item flexrow" data-item-id="{{meditation._id}}" data-attribute="{{key}}">
|
<li class="item flexrow" data-item-id="{{meditation._id}}" data-attribute="{{key}}">
|
||||||
<span class="meditation-label flex-grow"><a data-item-id="{{meditation._id}}">{{meditation.name}} - {{meditation.data.competence}}</a></span>
|
<span class="meditation-label flex-grow"><a data-item-id="{{meditation._id}}">{{meditation.name}} - {{meditation.system.competence}}</a></span>
|
||||||
<div class="item-controls flex-shrink">
|
<div class="item-controls flex-shrink">
|
||||||
<a class="item-control item-edit" title="Editer"><i class="fas fa-edit"></i></a>
|
<a class="item-control item-edit" title="Editer"><i class="fas fa-edit"></i></a>
|
||||||
<a class="item-control item-delete" title="Supprimer"><i class="fas fa-trash"></i></a>
|
<a class="item-control item-delete" title="Supprimer"><i class="fas fa-trash"></i></a>
|
||||||
|
Loading…
Reference in New Issue
Block a user