Fix: les PNJs peuvent de nouveau dormir

This commit is contained in:
Vincent Vandemeulebrouck 2023-03-08 23:07:39 +01:00
parent 0c11013694
commit a563233d6b

View File

@ -4,7 +4,10 @@ import { EffetsDraconiques } from "../tmr/effets-draconiques.js";
export class DialogRepos extends Dialog { export class DialogRepos extends Dialog {
static async create(actor) { static async create(actor) {
if (!ReglesOptionelles.isUsing("chateau-dormant-gardien")) { if (!actor.isPersonnage()) {
return
}
if (!ReglesOptionelles.isUsing("chateau-dormant-gardien") || !actor.hasPlayerOwner) {
actor.system.sommeil = { actor.system.sommeil = {
"nouveaujour": true, "nouveaujour": true,
"insomnie": EffetsDraconiques.isSujetInsomnie(actor), "insomnie": EffetsDraconiques.isSujetInsomnie(actor),