forked from public/foundryvtt-reve-de-dragon
Merge branch 'master' of gitlab.com:LeRatierBretonnien/foundryvtt-reve-de-dragon
This commit is contained in:
@ -748,14 +748,18 @@ export class RdDActor extends Actor {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async displayTMR( isRapide=false )
|
||||
async displayTMR(mode="normal" )
|
||||
{
|
||||
let minReveValue = (isRapide) ? 3 : 2;
|
||||
if (this.data.data.reve.reve.value <= minReveValue ) {
|
||||
ChatMessage.create( { title: "Montée impossible !", content: "Vous n'avez plus assez de Points de Reve pour monter dans les Terres Médianes",
|
||||
whisper: ChatMessage.getWhisperRecipients(game.user.name) } );
|
||||
return;
|
||||
}
|
||||
let isRapide= mode == "rapide"
|
||||
if (mode != "visu")
|
||||
{
|
||||
let minReveValue = (isRapide) ? 3 : 2;
|
||||
if (this.data.data.reve.reve.value <= minReveValue ) {
|
||||
ChatMessage.create( { title: "Montée impossible !", content: "Vous n'avez plus assez de Points de Reve pour monter dans les Terres Médianes",
|
||||
whisper: ChatMessage.getWhisperRecipients(game.user.name) } );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
let data = {
|
||||
fatigueHTML:"<table class='table-fatigue'>" + RdDUtility.makeHTMLfatigueMatrix( this.data.data.sante.fatigue.value, this.data.data.sante.endurance.max ).html() + "</table>",
|
||||
@ -766,7 +770,7 @@ export class RdDActor extends Actor {
|
||||
isRapide: isRapide
|
||||
}
|
||||
let html = await renderTemplate('systems/foundryvtt-reve-de-dragon/templates/dialog-tmr.html', data );
|
||||
this.currentTMR = new RdDTMRDialog(html, this, data );
|
||||
this.currentTMR = new RdDTMRDialog(html, this, data, mode == "visu");
|
||||
this.currentTMR.render(true);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user