Various fixes for v12

This commit is contained in:
2024-06-07 11:12:00 +02:00
parent 8775df5285
commit a385b98126
7 changed files with 7 additions and 9 deletions

View File

@ -17,7 +17,7 @@ export class AutoAdjustDarkness {
static async adjust(darkness) {
if (AutoAdjustDarkness.isAuto()) {
const scene = game.scenes.viewed;
if (scene?.globalLight && scene?.tokenVision) {
if (scene?.environment?.globalLight?.enabled && scene?.tokenVision) {
await scene.update({ darkness });
}
}