Améliorations des titres des fenêtres de jets

This commit is contained in:
2026-07-10 23:37:42 +02:00
parent 89207df01d
commit 6636ebb77c
12 changed files with 37 additions and 16 deletions
+10 -5
View File
@@ -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
})
}
}