Corrections relecture IA
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user