Skip to content

Commit

Permalink
1.0.24 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
IronMonk88 committed Apr 28, 2021
1 parent e24e394 commit 5c67ae6
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 10 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.24
Fixing an issue with Enhanced Terrain Layer not finding a place to put the additional controls on an item.

Adding Urban environment, and Furniture obstacle.

# Version 1.0.23
Fixing an issue with changing environment back to blank affecting the icon.

Expand Down
2 changes: 2 additions & 0 deletions classes/terrainlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,12 @@ export class TerrainLayer extends PlaceablesLayer {
{ id: 'mountain', text: 'EnhancedTerrainLayer.environment.mountain', icon: 'modules/enhanced-terrain-layer/img/environment/mountain.png' },
{ id: 'swamp', text: 'EnhancedTerrainLayer.environment.swamp', icon: 'modules/enhanced-terrain-layer/img/environment/swamp.png' },
{ id: 'underdark', text: 'EnhancedTerrainLayer.environment.underdark', icon: 'modules/enhanced-terrain-layer/img/environment/underdark.png' },
{ id: 'urban', text: 'EnhancedTerrainLayer.environment.urban' },
{ id: 'water', text: 'EnhancedTerrainLayer.environment.water', icon: 'modules/enhanced-terrain-layer/img/environment/water.png' },

{ id: 'crowd', text: 'EnhancedTerrainLayer.obstacle.crowd', icon: 'modules/enhanced-terrain-layer/img/environment/crowd.png', obstacle: true },
{ id: 'current', text: 'EnhancedTerrainLayer.obstacle.current', icon: 'modules/enhanced-terrain-layer/img/environment/current.png', obstacle: true },
{ id: 'furniture', text: 'EnhancedTerrainLayer.obstacle.furniture', obstacle: true },
{ id: 'magic', text: 'EnhancedTerrainLayer.obstacle.magic', icon: 'modules/enhanced-terrain-layer/img/environment/magic.png', obstacle: true },
{ id: 'plants', text: 'EnhancedTerrainLayer.obstacle.plants', icon: 'modules/enhanced-terrain-layer/img/environment/plants.png', obstacle: true },
{ id: 'rubble', text: 'EnhancedTerrainLayer.obstacle.rubble', icon: 'modules/enhanced-terrain-layer/img/environment/rubble.png', obstacle: true }
Expand Down
6 changes: 4 additions & 2 deletions lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
"EnhancedTerrainLayer.show-on-drag.hint": "Show the terrain highlight when a token is dragged",
"EnhancedTerrainLayer.tokens-cause-difficult.name": "Tokens cause difficult Terrain",
"EnhancedTerrainLayer.tokens-cause-difficult.hint": "When a token is dragged over another token, it's considered difficult terrain.",
"EnhancedTerrainLayer.use-obstacles.name": "Use Separate Obstacles",
"EnhancedTerrainLayer.use-obstacles.hint": "Allow both Environment and Obstacles to be set on terrain instead of combining them.",
"EnhancedTerrainLayer.use-obstacles.name": "Use Additional Obstacles",
"EnhancedTerrainLayer.use-obstacles.hint": "Allow the additional use of obstacles in combination with an environment.",

"EnhancedTerrainLayer.terraintype.ground": "Ground",
"EnhancedTerrainLayer.terraintype.air": "Air Only",
Expand All @@ -46,10 +46,12 @@
"EnhancedTerrainLayer.environment.mountain": "Mountain",
"EnhancedTerrainLayer.environment.swamp": "Swamp",
"EnhancedTerrainLayer.environment.underdark": "Underdark",
"EnhancedTerrainLayer.environment.urban": "Urban",
"EnhancedTerrainLayer.environment.water": "Water",

"EnhancedTerrainLayer.obstacle.crowd": "Crowd",
"EnhancedTerrainLayer.obstacle.current": "Current",
"EnhancedTerrainLayer.obstacle.furniture": "Furniture",
"EnhancedTerrainLayer.obstacle.magic": "Magic",
"EnhancedTerrainLayer.obstacle.plants": "Plants",
"EnhancedTerrainLayer.obstacle.rubble": "Rubble",
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.23",
"version": "1.0.24",
"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.23.zip",
"download" : "https://github.com/ironmonk88/enhanced-terrain-layer/archive/1.0.24.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
16 changes: 10 additions & 6 deletions terrain-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,14 @@ function addControls(app, html) {
.append(obsGroup)
.val(app.object.getFlag('enhanced-terrain-layer', 'environment'))));

let group = $('[name="flags.mess.templateTexture"], [name="texture"],[name="data.target.units"],[name="data.range.value"],[name="backgroundColor"]', html).get(0).closest(".form-group");
if (group) {
environment.insertAfter(group);
type.insertAfter(group);
cost.insertAfter(group);
let ctrl = $('[name="flags.mess.templateTexture"], [name="texture"],[name="data.target.units"],[name="data.range.value"],[name="backgroundColor"]', html);
if (ctrl.length > 0) {
let group = ctrl.get(0).closest(".form-group");
if (group) {
environment.insertAfter(group);
type.insertAfter(group);
cost.insertAfter(group);
}
}
}

Expand Down Expand Up @@ -261,7 +264,8 @@ Hooks.on("renderSceneConfig", (app, html) => {
});

Hooks.on("renderItemSheet", (app, html) => {
addControls(app, html);
if(app.object.type == 'spell')
addControls(app, html);
});

PIXI.Graphics.prototype.drawDashedPolygon = function (polygons, x, y, rotation, dash, gap, offsetPercentage) {
Expand Down

0 comments on commit 5c67ae6

Please sign in to comment.