Skip to content

Commit

Permalink
Merge branch 'release/0.7.7' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
caewok committed Jan 10, 2024
2 parents f9b49da + 303fd6d commit 3791add
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 23 deletions.
15 changes: 0 additions & 15 deletions scripts/PlaceableObject.js

This file was deleted.

6 changes: 2 additions & 4 deletions scripts/Ruler.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 0 additions & 2 deletions scripts/patching.js
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -24,7 +23,6 @@ const PATCHES = {
GridLayer: PATCHES_GridLayer,
HexagonalGrid: PATCHES_HexagonalGrid,
Ruler: PATCHES_Ruler,
PlaceableObject: PATCHES_PlaceableObject,
Token: PATCHES_Token,
Settings: PATCHES_Settings
};
Expand Down
4 changes: 2 additions & 2 deletions scripts/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,15 +256,15 @@ 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();
const delta = now - MOVE_TIME;
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.
}
Expand Down

0 comments on commit 3791add

Please sign in to comment.