Corrections relecture IA

This commit is contained in:
2026-03-20 02:09:55 +01:00
parent a768419029
commit d80efba092
9 changed files with 201 additions and 180 deletions

View File

@@ -107,7 +107,7 @@ export class AppAstrologie extends Application {
const detail = foundry.utils.duplicate(nombreAstral);
const timestamp = new RdDTimestamp({ indexDate: nombreAstral.index });
detail.date = { mois: timestamp.mois, jour: timestamp.jour + 1 };
detail.lectures.forEach(lecture => lecture.actorName = game.actors.get(lecture.actorId).name ?? "Inconnu");
detail.lectures.forEach(lecture => lecture.actorName = game.actors.get(lecture.actorId)?.getAlias() ?? "Inconnu");
return detail;
}

View File

@@ -9,10 +9,10 @@ export class DialogStress extends Dialog {
immediat: false,
actors: game.actors.filter(actor => actor.isPersonnageJoueur())
.map(actor => ({
id: actor.id,
name: actor.name,
selected: true
})
id: actor.id,
name: actor.name,
selected: true
})
)
};
@@ -22,7 +22,8 @@ export class DialogStress extends Dialog {
}
constructor(dialogData, html) {
const options = { classes: ["DialogStress"],
const options = {
classes: ["DialogStress"],
width: 400,
height: 'fit-content',
'z-index': 99999
@@ -49,9 +50,12 @@ export class DialogStress extends Dialog {
const stress = Number(this.html.find("form.rdddialogstress input[name='stress']").val());
const compteur = (this.html.find("form.rdddialogstress input[name='immediat']").prop("checked")) ? 'experience' : 'stress';
this.dialogData.actors.filter(it => it.selected)
.map(it => game.actors.get(it.id))
.forEach(async actor => await actor.distribuerStress(compteur, stress, motif));
await Promise.all(
this.dialogData.actors.filter(it => it.selected)
.map(actor => game.actors.get(actor.id))
.filter(actor => actor != undefined)
.map(actor => actor.distribuerStress(compteur, stress, motif))
)
}
async onSelectActor(event) {