From e3367a33b46aac33e12979bf6e3c8196d8d8d971 Mon Sep 17 00:00:00 2001 From: theripper93 Date: Mon, 2 Sep 2024 23:15:35 +0200 Subject: [PATCH] a --- scripts/patches.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/scripts/patches.js b/scripts/patches.js index 77c683f..58a9d76 100644 --- a/scripts/patches.js +++ b/scripts/patches.js @@ -11,7 +11,7 @@ class WallHeightUtils{ this._autoLosHeight = false; this._defaultTokenHeight = 6; this._losHeightMulti = 0.89; - this.reinitializeLightSources = foundry.utils.debounce(this.reinitializeLightSources.bind(this), 1); + this.reinitializeLightSources = foundry.utils.debounce(this.reinitializeLightSources.bind(this), 16); } cacheSettings(){ @@ -289,10 +289,7 @@ export function registerWrappers() { if (!advancedVision) return result; const {top, bottom} = getWallBounds(wall); const object = this.config?.source?.object ?? this.origin?.object ?? this.object; - if (!object) { - //console.warn(`Wall Height: Ignoring Wall Height for this test\n\nNo source found in ${this.constructor.name}#config, the system or module performing the check has not provided an object to test against. Please make sure to include a source in the configuration object of your PointVisionSource`); - return result; - } + if (!object) return result; const b = object?.b ?? object?.elevation ?? -Infinity; const t = object?.t ?? object?.elevation ?? +Infinity; return b >= bottom && t <= top;