Améliorations des titres des fenêtres de jets
This commit is contained in:
+10
-5
@@ -1838,12 +1838,12 @@ export class RdDActor extends RdDBaseActorSang {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
async rollCaracCompetence(caracName, compName, diff, options = { title: "" }) {
|
||||
async rollCaracCompetence(caracName, compName, diff, options = { title: undefined, verb: undefined }) {
|
||||
|
||||
if (OptionsAvancees.isUsing(ROLL_DIALOG_V2)) {
|
||||
const rollData = {
|
||||
ids: { actorId: this.id },
|
||||
type: { allowed: [ROLL_TYPE_COMP], current: ROLL_TYPE_COMP },
|
||||
type: { allowed: [ROLL_TYPE_COMP], current: ROLL_TYPE_COMP, label: options.verb },
|
||||
selected: {
|
||||
carac: { key: caracName },
|
||||
comp: { key: compName, forced: options.forced },
|
||||
@@ -1879,10 +1879,11 @@ export class RdDActor extends RdDBaseActorSang {
|
||||
RdDEmpoignade.checkEmpoignadeEnCours(this)
|
||||
const tache = this.getTache(id)
|
||||
if (OptionsAvancees.isUsing(ROLL_DIALOG_V2)) {
|
||||
options.title = options.title ?? 'Jet de Tâche'
|
||||
const rollData = {
|
||||
ids: { actorId: this.id },
|
||||
selected: { tache: { key: tache.id, forced: options.forced } },
|
||||
type: { allowed: [ROLL_TYPE_TACHE], current: ROLL_TYPE_TACHE }
|
||||
type: { allowed: [ROLL_TYPE_TACHE], current: ROLL_TYPE_TACHE}
|
||||
}
|
||||
return await RollDialog.create(rollData, options)
|
||||
}
|
||||
@@ -2409,7 +2410,9 @@ export class RdDActor extends RdDBaseActorSang {
|
||||
const tacheId = (await this.getTacheBlessure(blesse, blessure))?.id
|
||||
return await this.rollTache(tacheId, {
|
||||
callbacks: [async r => await blesse.callbackPremiersSoins(blessureId, r, this.id)],
|
||||
title: 'Premiers soins', forced: true
|
||||
verb: "soigne",
|
||||
title: 'Premiers soins',
|
||||
forced: true
|
||||
});
|
||||
}
|
||||
else if (!blessure.system.soinscomplets.done) {
|
||||
@@ -2417,7 +2420,9 @@ export class RdDActor extends RdDBaseActorSang {
|
||||
return await this.rollCaracCompetence(CARACS.DEXTERITE, "Chirurgie", diff, {
|
||||
callbacks: [async r => await blesse.onRollSoinsComplets(blessureId, r, this.id)],
|
||||
onRollDone: RollDialog.onRollDoneClose,
|
||||
title: "Soins complets", forced: true
|
||||
verb: "applique des soins complets à",
|
||||
title: "Soins complets",
|
||||
forced: true
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user