Meilleur affichage pour rencontre/pas rencontre et type de TMR affichés sur TMR cachées
This commit is contained in:
parent
c18fa00a3b
commit
a0bbeea99b
@ -1395,7 +1395,7 @@ export class RdDActor extends Actor {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async updateCoordTMR(coord) {
|
||||
console.log("UPDATE TMR", coord);
|
||||
//console.log("UPDATE TMR", coord);
|
||||
await this.update({ "data.reve.tmrpos.coord": coord });
|
||||
}
|
||||
|
||||
|
@ -105,6 +105,7 @@ export class RdDTMRDialog extends Dialog {
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
updateTokens() {
|
||||
this._removeTokens(t => true);
|
||||
this.loadRencontres();
|
||||
@ -113,6 +114,7 @@ export class RdDTMRDialog extends Dialog {
|
||||
this._createTokens();
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
removeToken(tmr, casetmr) {
|
||||
this._removeTokens(t => t.coordTMR() == tmr.coord && t.caseSpeciale?._id == casetmr._id);
|
||||
this.updateTokens()
|
||||
@ -537,12 +539,15 @@ export class RdDTMRDialog extends Dialog {
|
||||
if (rencontre) {
|
||||
return rencontre;
|
||||
}
|
||||
let locTMR = (this.cacheTMR) ? Misc.upperFirst(tmr.type) + " ??" : tmr.label + " (" + tmr.coord + ")";
|
||||
|
||||
let myRoll = await RdDDice.rollTotal("1d7");
|
||||
if (TMRUtility.isForceRencontre() || myRoll == 7) {
|
||||
this._tellToUser(myRoll + ": Rencontre en " + locTMR);
|
||||
return await this.rencontreTMRRoll(tmr, this.actor.isRencontreSpeciale());
|
||||
} else {
|
||||
this._tellToUser(myRoll + ": Pas de rencontre en " + locTMR);
|
||||
}
|
||||
let locTMR = (this.cacheTMR) ? "??" : tmr.label + " (" + tmr.coord + ")";
|
||||
this._tellToUser(myRoll + ": Pas de rencontre en " + locTMR);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
Loading…
Reference in New Issue
Block a user