Fix: log erreur TMR en mode visu

En mode visualisation, les informations du personnage ne sont
pas affichées
This commit is contained in:
Vincent Vandemeulebrouck 2024-03-09 19:38:53 +01:00
parent 3b269b2baa
commit bc169d931b
2 changed files with 42 additions and 44 deletions

View File

@ -298,13 +298,12 @@ export class RdDTMRDialog extends Dialog {
/* -------------------------------------------- */
async updateValuesDisplay() {
if (!this.rendered) {
if (this.viewOnly || !this.rendered) {
return;
}
const coord = this._getCoordActor();
HtmlUtility.showControlWhen(this.html.find(".lire-signe-draconique"), this.actor.isResonanceSigneDraconique(coord));
let ptsreve = document.getElementById("tmr-pointsreve-value");
ptsreve.innerHTML = this.actor.system.reve.reve.value;

View File

@ -21,49 +21,48 @@
</div>
{{else}}
{{#if (and isGM hasPlayerOwner)}}
<div class="flex-group-center flex-shrink">
<h4>Le gardien gére les TMR du joueur, le joueur ne peut pas monter dans les TMR!</h4>
</div>
<div class="flex-group-center flex-shrink">
<h4>Le gardien gére les TMR du joueur, le joueur ne peut pas monter dans les TMR!</h4>
</div>
{{/if}}
<div class="flex-group-center flex-shrink">
<img class="small-button-direction tmr-move" data-move="topleft" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/dir-topleft.svg">
<img class="small-button-direction tmr-move" data-move="top" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/dir-top.svg">
<img class="small-button-direction tmr-move" data-move="topright" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/dir-topright.svg">
</div>
<div class="flex-group-center flex-shrink">
<label>Coordonnées : </label><span id="tmr-pos">0</span>
</div>
<div class="flex-group-center flex-shrink">
<img class="small-button-direction tmr-move" data-move="bottomleft" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/dir-bottomleft.svg">
<img class="small-button-direction tmr-move" data-move="bottom" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/dir-bottom.svg">
<img class="small-button-direction tmr-move" data-move="bottomright" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/dir-bottomright.svg">
</div>
<div class="flex-group-center flex-shrink lire-signe-draconique">
<a>Lire un signe draconique</a>
</div>
<div class="flex-group-center flex-shrink lancer-sort">
<a>Lancer un Sort</a>
</div>
<hr>
<div class="flex-group-center flex-shrink">
<label>Carac. Rêve : </label><label>{{caracReve}}</label>
</div>
<div class="flex-group-center flex-shrink">
<label>Rêve actuel : </label><span id="tmr-pointsreve-value">0</span>
</div>
<div class="flex-group-center flex-shrink">
<label>Etat général : </label><span id="tmr-etatgeneral-value">0</span>
</div>
<div class="flex-group-center flex-shrink">
<label>Refoulement : </label><span id="tmr-refoulement-value">0</span>
</div>
<div class="flex-group-center flex-actions-bar appliquerFatigue">
Fatigue
<span id="tmr-fatigue-table">{{{fatigue.html}}}</span>
</div>
<div class="flex-group-center flex-shrink">
<img class="small-button-direction tmr-move" data-move="topleft" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/dir-topleft.svg">
<img class="small-button-direction tmr-move" data-move="top" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/dir-top.svg">
<img class="small-button-direction tmr-move" data-move="topright" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/dir-topright.svg">
</div>
<div class="flex-group-center flex-shrink">
<label>Coordonnées : </label><span id="tmr-pos">0</span>
</div>
<div class="flex-group-center flex-shrink">
<img class="small-button-direction tmr-move" data-move="bottomleft" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/dir-bottomleft.svg">
<img class="small-button-direction tmr-move" data-move="bottom" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/dir-bottom.svg">
<img class="small-button-direction tmr-move" data-move="bottomright" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/dir-bottomright.svg">
</div>
<div class="flex-group-center flex-shrink lire-signe-draconique">
<a>Lire un signe draconique</a>
</div>
<div class="flex-group-center flex-shrink lancer-sort">
<a>Lancer un Sort</a>
</div>
<hr>
<div class="flex-group-center flex-shrink">
<label>Carac. Rêve : </label><label>{{caracReve}}</label>
</div>
<div class="flex-group-center flex-shrink">
<label>Rêve actuel : </label><span id="tmr-pointsreve-value">0</span>
</div>
<div class="flex-group-center flex-shrink">
<label>Etat général : </label><span id="tmr-etatgeneral-value">0</span>
</div>
<div class="flex-group-center flex-shrink">
<label>Refoulement : </label><span id="tmr-refoulement-value">0</span>
</div>
<div class="flex-group-center flex-actions-bar appliquerFatigue">
Fatigue
<span id="tmr-fatigue-table">{{{fatigue.html}}}</span>
</div>
{{/if}}
<div class="flex-group-center flex-grow">
</div>
<div class="flex-group-center flex-grow"></div>
</div>
</div>
</form>