Skip to content

Commit

Permalink
1.0.15 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
IronMonk88 committed Mar 28, 2021
1 parent 7cb0d37 commit 5e35003
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#Version 1.0.15
Fixed and issue with elevation

Fixed an issue with terrainAt

#Version 1.0.14
update the code so that tokens don't think of themselves as difficult terrain. This will require the ruler to pass in the token that is moving.

Expand Down
4 changes: 2 additions & 2 deletions classes/terrain.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ export class Terrain extends PlaceableObject {
return this.data.multiple || Terrain.defaults.multiple;
}

get type() {
return this.data.type || Terrain.defaults.type;
get terraintype() {
return this.data.terraintype || Terrain.defaults.terraintype;
}

static async create(data, options) {
Expand Down
4 changes: 2 additions & 2 deletions classes/terrainlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export class TerrainLayer extends PlaceablesLayer {
const testY = (gy + hy) - terrain.data.y;
if (terrain.multiple != 1 &&
!options.ignore?.includes(terrain.environment) &&
!((terrain.terraintype == 'ground' && elevation > 0) || (terrain.terraintype == 'air' && elevation <= 0)) &&
!((terrain.data.terraintype == 'ground' && elevation > 0) || (terrain.data.terraintype == 'air' && elevation <= 0)) &&
terrain.shape.contains(testX, testY)) {
cost = Math.max(terrain.cost(options), cost);
}
Expand Down Expand Up @@ -143,7 +143,7 @@ export class TerrainLayer extends PlaceablesLayer {
let terrains = this.placeables.filter(t => {
const testX = (gx + hx) - t.data.x;
const testY = (gy + hy) - t.data.y;
return terrain.shape.contains(testX, testY);
return t.shape.contains(testX, testY);
});

return terrains;
Expand Down
4 changes: 2 additions & 2 deletions module.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "enhanced-terrain-layer",
"title": "Enhanced Terrain Layer",
"description": "A base module that adds a Terrain Layer to Foundry. Used as a library for Rulers and other modules",
"version": "1.0.14",
"version": "1.0.15",
"author": "IronMonk, ironmonk88#4075",
"socket": true,
"languages": [
Expand Down Expand Up @@ -30,7 +30,7 @@
"styles": [ "css/terrainlayer.css" ],
"packs": [],
"url" : "https://github.com/ironmonk88/enhanced-terrain-layer",
"download" : "https://github.com/ironmonk88/enhanced-terrain-layer/archive/1.0.14.zip",
"download" : "https://github.com/ironmonk88/enhanced-terrain-layer/archive/1.0.15.zip",
"manifest" : "https://github.com/ironmonk88/enhanced-terrain-layer/releases/latest/download/module.json",
"bugs": "https://github.com/ironmonk88/enhanced-terrain-layer/issues",
"allowBugReporter": true,
Expand Down

0 comments on commit 5e35003

Please sign in to comment.