Skip to content

Commit 40d351f

Browse files
authored
Add files via upload
1 parent 69588b7 commit 40d351f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/helpers.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@ class betterRoofsHelpers {
153153

154154
roomDetection(tile) {
155155
let buildingWalls = [];
156-
let tileRange = tile.document.getFlag("levels", "heightRange")?.split(",");
156+
let isLevels = game.modules.get('levels')?.active
157+
let tileRange = isLevels ? tile.document.getFlag("levels", "heightRange")?.split(",") : undefined;
157158
let tileCorners = [
158159
{ x: tile.x, y: tile.y }, //tl
159160
{ x: tile.x + tile.width, y: tile.y }, //tr

0 commit comments

Comments
 (0)