Merge branch 'working' into 'master'

Déplacer le rêve actuel dans l'en-tête

See merge request LeRatierBretonnien/foundryvtt-reve-de-dragon!23
This commit is contained in:
Leratier Bretonnien 2020-11-18 19:03:19 +00:00
commit eb42eaae2c
7 changed files with 27 additions and 13 deletions

BIN
icons/heures/hd05br.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
icons/heures/hd08br.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
icons/heures/hd12br.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -291,7 +291,7 @@ export class RdDActorSheet extends ActorSheet {
this.actor.setPointsDeSeuil(event.currentTarget.value);
} );
// On competence change
// On competence xp change
html.find('.competence-xp').change((event) => {
let compName = event.currentTarget.attributes.compname.value;
this.actor.updateCompetenceXP( compName, parseInt(event.target.value) );
@ -324,6 +324,14 @@ export class RdDActorSheet extends ActorSheet {
this.actor.santeIncDec("endurance", -1);
this.render(true);
});
html.find('#ptreve-actuel-plus').click((event) => {
this.actor.updatePointsDeReve(1);
this.render(true);
});
html.find('#ptreve-actuel-moins').click((event) => {
this.actor.updatePointsDeReve(-1);
this.render(true);
});
html.find('#fatigue-plus').click((event) => {
this.actor.santeIncDec("fatigue", 1);
this.render(true);

View File

@ -455,9 +455,9 @@ export class RdDActor extends Actor {
updateCarac( caracName, caracValue )
{
let caracpath = "data.carac." + caracName + ".value"
if (caracName == reve) {
if (caracName == "reve") {
if (caracValue > Misc.toInt(this.data.data.reve.seuil.value)) {
this.setPointDeSeuil(caracValue);
this.setPointsDeSeuil(caracValue);
}
}
this.update( { caracpath: caracValue } );

View File

@ -454,6 +454,12 @@ button {
flex-grow: 2;
}
.attribut-value,
.carac-value {
flex-grow: 0;
flex-basis: 64px;
margin-right: 4px;
margin-left: 4px;
}
.sante-value,
.competence-value {
flex-grow: 0;

View File

@ -21,6 +21,10 @@
<span>Sonné :</span>
<input class="resource-content" type="checkbox" name="data.sante.sonne.value" value="{{data.sante.sonne.value}}" {{#if data.sante.sonne.value}}checked{{/if}} />
</div>
<div>
<span><span class="ptreve-actuel"><a>Rêve</a></span> <a id="ptreve-actuel-plus">+</a> / <a id="ptreve-actuel-moins">-</a></span>
<input class="resource-content" id="pointsreve-value" type="text" name="data.reve.reve.value" value="{{data.reve.reve.value}}" data-dtype="Number" />/{{data.reve.seuil.value}}
</div>
</div>
<div class="flex-group-center flex-fatigue">
Fatigue <a id="fatigue-plus">+</a> / <a id="fatigue-moins">-</a>
@ -66,7 +70,7 @@
{{#if carac.derivee}}
<label class="competence-value flexrow">{{carac.value}}</label>
{{else}}
<input class="competence-value flexrow" type="text" name="data.carac.{{key}}.value" value="{{carac.value}}" data-dtype="{{carac.type}}"/>
<input class="carac-value flexrow" type="text" name="data.carac.{{key}}.value" value="{{carac.value}}" data-dtype="{{carac.type}}"/>
<input class="competence-xp flexrow" type="text" name="data.carac.{{key}}.xp" value="{{carac.xp}}" data-dtype="number"/>
{{/if}}
</li>
@ -282,7 +286,7 @@
<div class="tab blessurescompteurs" data-group="primary" data-tab="blessurescompteurs">
<div class="flex-group-left">
<span class="dormir-une-heure"><a title="Dormir une heure"><img src="icons/svg/sleep.svg" alt="Dormir une heure" width="50" height="50"/></a></span>
<span class="chateau-dormant"><a title="Chateau Dormant"><img src="systems/foundryvtt-reve-de-dragon/icons/heures/hd12.png" alt="Chateau Dormant" width="50" height="50"/></a></span>
<span class="chateau-dormant"><a title="Chateau Dormant"><img src="systems/foundryvtt-reve-de-dragon/icons/heures/hd12br.png" alt="Chateau Dormant" width="50" height="50"/></a></span>
</div>
<div class="flex-group-left flexrow">
<ol class="item-list">
@ -406,15 +410,11 @@
<li class="item flexrow" >
<span class="competence-label"></span>
<div>
<span class="monte-tmr"><a title="Montée dans les Terres Medianes !"><img src="systems/foundryvtt-reve-de-dragon/icons/heures/hd08.png" alt="Montée dans les Terres Medianes !" width="50" height="50"/></a></span>
<span class="monte-tmr-rapide"><a title="Montée accélérée dans les Terres Medianes !"><img src="systems/foundryvtt-reve-de-dragon/icons/heures/hd05.png" alt="Montée accélérée dans les Terres Medianes !" width="50" height="50"/></a></span>
<span class="monte-tmr"><a title="Montée dans les Terres Medianes !"><img src="systems/foundryvtt-reve-de-dragon/icons/heures/hd08br.png" alt="Montée dans les Terres Medianes !" width="50" height="50"/></a></span>
<span class="monte-tmr-rapide"><a title="Montée accélérée dans les Terres Medianes !"><img src="systems/foundryvtt-reve-de-dragon/icons/heures/hd05br.png" alt="Montée accélérée dans les Terres Medianes !" width="50" height="50"/></a></span>
<span class="visu-tmr"><a title="Regarder les Terres Medianes"><img src="icons/svg/eye.svg" alt="Regarder les Terres Medianes" width="50" height="50"/></a></span>
</div>
</li>
<li class="item flexrow">
<span class="ptreve-actuel competence-label"><a>Points de Rêve actuels</a> :</span>
<span><input class="pointsreve-value" type="text" name="data.reve.reve.value" value="{{data.reve.reve.value}}" data-dtype="Number"/></span>
</li>
<li class="item flexrow">
<span class="competence-label">Seuil de Rêve :</span>
<span>