diff --git a/scripts/PlaceableObject.js b/scripts/PlaceableObject.js deleted file mode 100644 index d7782b4..0000000 --- a/scripts/PlaceableObject.js +++ /dev/null @@ -1,15 +0,0 @@ -/* globals -canvas -*/ -/* eslint no-unused-vars: ["error", { "argsIgnorePattern": "^_" }] */ - -// Patches for the Token class -export const PATCHES = {}; -PATCHES.TOKEN_RULER = {}; // Assume this patch is only present if the token ruler setting is enabled. - - -function _onDragLeftStart(wrapped, event) { - console.log("Placeable.prototype._onDragLeftStart"); -} - -PATCHES.TOKEN_RULER = { _onDragLeftStart }; \ No newline at end of file diff --git a/scripts/Ruler.js b/scripts/Ruler.js index deeaed2..44f083f 100644 --- a/scripts/Ruler.js +++ b/scripts/Ruler.js @@ -200,10 +200,8 @@ function _computeDistance(wrapped, gridSpaces) { for ( const segment of this.segments ) { segment.moveDistance = modifiedMoveDistance(segment.distance, segment.ray, token); totalMoveDistance += segment.moveDistance; - - const { A, B } = segment.ray; - console.debug(`${A.x},${A.y},${A.z} --> ${B.x},${B.y},${B.z}: distance ${segment.distance}, move ${segment.moveDistance}`); - + // const { A, B } = segment.ray; + //console.debug(`${A.x},${A.y},${A.z} --> ${B.x},${B.y},${B.z}: distance ${segment.distance}, move ${segment.moveDistance}`); } this.totalMoveDistance = totalMoveDistance; } diff --git a/scripts/patching.js b/scripts/patching.js index 99f1383..a342739 100644 --- a/scripts/patching.js +++ b/scripts/patching.js @@ -8,7 +8,6 @@ import { MODULES_ACTIVE } from "./const.js"; import { PATCHES as PATCHES_Ruler } from "./Ruler.js"; import { PATCHES as PATCHES_Token } from "./Token.js"; import { PATCHES as PATCHES_GridLayer } from "./GridLayer.js"; -import { PATCHES as PATCHES_PlaceableObject } from "./PlaceableObject.js"; import { PATCHES as PATCHES_ClientKeybindings } from "./ClientKeybindings.js"; import { PATCHES as PATCHES_BaseGrid } from "./BaseGrid.js"; import { PATCHES as PATCHES_HexagonalGrid } from "./HexagonalGrid.js"; @@ -24,7 +23,6 @@ const PATCHES = { GridLayer: PATCHES_GridLayer, HexagonalGrid: PATCHES_HexagonalGrid, Ruler: PATCHES_Ruler, - PlaceableObject: PATCHES_PlaceableObject, Token: PATCHES_Token, Settings: PATCHES_Settings }; diff --git a/scripts/settings.js b/scripts/settings.js index ddb96ee..dfe237f 100644 --- a/scripts/settings.js +++ b/scripts/settings.js @@ -256,7 +256,7 @@ function toggleTokenRulerWaypoint(context, add = true) { const position = canvas.mousePosition; const ruler = canvas.controls.ruler; if ( !canvas.tokens.active || !ruler || !ruler.active ) return; - console.debug(`${add ? "add" : "remove"}TokenRulerWaypoint`); + // console.debug(`${add ? "add" : "remove"}TokenRulerWaypoint`); // Keep track of when we last added/deleted a waypoint. const now = Date.now(); @@ -264,7 +264,7 @@ function toggleTokenRulerWaypoint(context, add = true) { if ( delta < 100 ) return true; // Throttle keyboard movement once per 100ms MOVE_TIME = now; - console.debug(`${add ? "adding" : "removing"}TokenRulerWaypoint`); + // console.debug(`${add ? "adding" : "removing"}TokenRulerWaypoint`); if ( add ) ruler._addWaypoint(position); else if ( ruler.waypoints.length > 1 ) ruler._removeWaypoint(position); // Removing the last waypoint throws errors. }