Remove support for TerrainLayer (Enhanced Terrain Layer stays supported)
This commit is contained in:
@@ -62,9 +62,6 @@ export function checkDependencies() {
|
||||
if (game.modules.get("enhanced-terrain-layer")?.active) {
|
||||
enabledTerrainModule = game.modules.get("enhanced-terrain-layer").data.title;
|
||||
}
|
||||
else if (game.modules.get("TerrainLayer")?.active) {
|
||||
enabledTerrainModule = game.modules.get("TerrainLayer").data.title;
|
||||
}
|
||||
if (enabledTerrainModule) {
|
||||
new Dialog({
|
||||
title: game.i18n.localize("drag-ruler.dependencies.terrain-ruler.title"),
|
||||
|
||||
@@ -168,7 +168,7 @@ export function measure(destination, options={}) {
|
||||
options.ignoreGrid = false;
|
||||
}
|
||||
|
||||
options.enableTerrainRuler = isToken && game.modules.get("terrain-ruler")?.active && (!game.modules.get("TerrainLayer")?.active || canvas.grid.type !== CONST.GRID_TYPES.GRIDLESS);
|
||||
options.enableTerrainRuler = isToken && game.modules.get("terrain-ruler")?.active;
|
||||
|
||||
const waypoints = this.waypoints.concat([destination]);
|
||||
// Move the waypoints to the center of the grid if a size is used that measures from edge to edge
|
||||
|
||||
@@ -49,7 +49,7 @@ function calculateUpdate(combat, token, rays) {
|
||||
}
|
||||
|
||||
// Add the passed waypoints to the combatant
|
||||
const terrainRulerAvailable = game.modules.get("terrain-ruler")?.active && (!game.modules.get("TerrainLayer")?.active || canvas.grid.type !== CONST.GRID_TYPES.GRIDLESS);
|
||||
const terrainRulerAvailable = game.modules.get("terrain-ruler")?.active;
|
||||
const dragRulerFlags = combatant.data.flags.dragRuler;
|
||||
const waypoints = dragRulerFlags.passedWaypoints;
|
||||
for (const ray of rays) {
|
||||
|
||||
@@ -61,11 +61,11 @@ export class SpeedProvider {
|
||||
* The area indicates the whole area that the token will occupy (for tokens larger than 1x1) the array will more than one entry.
|
||||
* The return value should be an integer indicating a multiplicator by that the cost of that step should be increased.
|
||||
* (1 is regular cost, 2 costs double, 3 costs triple, ...)
|
||||
*
|
||||
*
|
||||
* Parameters:
|
||||
* - options: An object used to configure TerrainLayer's cost calculation. Ex: If options.ignoreGrid is set to true, then Euclidean measurement can be forced on a gridded map.
|
||||
*
|
||||
* This function is only called if the TerrainLayer and TerrainRuler modules are enabled.
|
||||
* - options: An object used to configure Enhanced Terrain Layer's cost calculation. Ex: If options.ignoreGrid is set to true, then Euclidean measurement can be forced on a gridded map.
|
||||
*
|
||||
* This function is only called if the Enhanced Terrain Layer and Terrain Ruler modules are enabled.
|
||||
*
|
||||
* Implementing this method is optional and only needs to be done if you want to provide a custom cost function (for example to allow tokens to ignore difficult terrain)
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user