Skip to content

Commit

Permalink
Update main.js
Browse files Browse the repository at this point in the history
Incorporated changes from #49 
Courtesy of Ironmonk.
  • Loading branch information
velara authored Jun 12, 2023
1 parent 52023c7 commit 167c5bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ Hooks.once("enhancedTerrainLayer.ready", (RuleProvider) => {
let obstacles = [];
let costs = [];
for(var ii = 0; ii<terrain.length; ii++) {
if(terrain[ii].object.document.elevation >= tokenElevation && (terrain[ii].object.document.elevation-(terrain[ii].object.document.depth ?? 0)) <= tokenElevation && (token?.actor?.alliance ?? "none" !== (terrain[ii].object?.actor?.alliance ?? 0))){
if(terrain[ii].object.document.top >= tokenElevation && terrain[ii].object.document.bottom <= tokenElevation && (token?.actor?.alliance ?? "none" !== (terrain[ii].object?.actor?.alliance ?? 0))){
environments.push(terrain[ii].environment)
obstacles.push(terrain[ii].obstacle)
costs.push(terrain[ii].cost)
Expand Down

0 comments on commit 167c5bf

Please sign in to comment.