diff --git a/module/actor.js b/module/actor.js index 3ce87a7e..f09ae594 100644 --- a/module/actor.js +++ b/module/actor.js @@ -387,6 +387,14 @@ export class RdDActor extends RdDBaseActor { await this.distribuerStress('stress', consigne.stress.valeur, consigne.stress.motif); } await this.update({ 'system.sommeil': consigne.sommeil }) + const player = this.findPlayer(); + if (player) { + ChatUtility.notifyUser(player.id, 'info', `Vous pouvez gérer la nuit de ${this.name}`); + } + } + + findPlayer() { + return game.users.players.find(player => player.active && player.character?.id == this.id); } async onTimeChanging(oldTimestamp, newTimestamp) {