manuelVo / foundryvtt-drag-ruler

A Foundry VTT module that shows a ruler when dragging tokens so you can see how far you've dragged them
MIT License
39 stars 52 forks source link

Drag Ruler does not work in Pathfinder 1 #247

Open AshnakAGQ opened 1 year ago

AshnakAGQ commented 1 year ago

I am getting errors in the log when attempting to use this while terrain ruler is installed. Didn't have any problems in previous version. It's not drawing the colored path at all anymore. Sometimes it fails to even draw the ruler.

error

ckdragons commented 1 year ago

I'm also experiencing this issue without Terrain Ruler and Enhanced Terrain Layer installed. I have disabled these modules, reloaded my world, and it's still showing only white paths (no color).

ckdragons commented 1 year ago

I enabled Terrain Ruler and Enhanced Terrain Layer again, moved a character, and here is the resulting F12 info.

Error: You are accessing PlaceableObject#data which is no longer used and instead the Document class should be referenced directly as PlaceableObject#document. Deprecated since Version 10 Backwards-compatible support will be removed in Version 12 logCompatibilityWarning commons.js:1692 get foundry.js:24741 getBaseSpeed modules.mjs:50 getRanges modules.mjs:25 getRangesFromSpeedProvider api.js:90 dragRulerGetColorForDistance ruler.js:468 highlightMeasurementTerrainRuler compatibility.js:12 performPostPathfindingActions ruler.js:198 measure ruler.js:133 scheduleMeasurement foundry_imports.js:153 onMouseMove foundry_imports.js:145 onEntityLeftDragMove main.js:159 onEntityLeftDragMoveSnap main.js:153 call_wrapper libWrapper-wrapper.js:616 _onDragLeftMove#0 libWrapper-wrapper.js:189 callback foundry.js:27723 _handleDragMove foundry.js:28080 _handleMouseMove foundry.js:28052 emit index.js:202 dispatchEvent interaction.min.mjs:8 processPointerMove interaction.min.mjs:8 recursiveFindHit interaction.min.mjs:8 findHit interaction.min.mjs:8 processInteractive interaction.min.mjs:8 onPointerMove interaction.min.mjs:8 commons.js:1703:34 Error: You are accessing PlaceableObject#data which is no longer used and instead the Document class should be referenced directly as PlaceableObject#document. Deprecated since Version 10 Backwards-compatible support will be removed in Version 12 logCompatibilityWarning commons.js:1692 get foundry.js:24741 getBaseSpeed modules.mjs:67 getRanges modules.mjs:25 getRangesFromSpeedProvider api.js:90 dragRulerGetColorForDistance ruler.js:468 highlightMeasurementTerrainRuler compatibility.js:12 performPostPathfindingActions ruler.js:198 measure ruler.js:133 scheduleMeasurement foundry_imports.js:153 onMouseMove foundry_imports.js:145 onEntityLeftDragMove main.js:159 onEntityLeftDragMoveSnap main.js:153 call_wrapper libWrapper-wrapper.js:616 _onDragLeftMove#0 libWrapper-wrapper.js:189 callback foundry.js:27723 _handleDragMove foundry.js:28080 _handleMouseMove foundry.js:28052 emit index.js:202 dispatchEvent interaction.min.mjs:8 processPointerMove interaction.min.mjs:8 recursiveFindHit interaction.min.mjs:8 findHit interaction.min.mjs:8 processInteractive interaction.min.mjs:8 onPointerMove interaction.min.mjs:8 commons.js:1703:34 Error: You are accessing the ActorCharacterPF#data object which is no longer used. Since V10 the Document class and its contained DataModel are merged into a combined data structure. You should now reference keys which were previously contained within the data object directly. logCompatibilityWarning commons.js:1692 _logV10CompatibilityWarning commons.js:6635 get data commons.js:6535 getBaseSpeed modules.mjs:74 getRanges modules.mjs:25 getRangesFromSpeedProvider api.js:90 dragRulerGetColorForDistance ruler.js:468 highlightMeasurementTerrainRuler compatibility.js:12 performPostPathfindingActions ruler.js:198 measure ruler.js:133 scheduleMeasurement foundry_imports.js:153 onMouseMove foundry_imports.js:145 onEntityLeftDragMove main.js:159 onEntityLeftDragMoveSnap main.js:153 call_wrapper libWrapper-wrapper.js:616 _onDragLeftMove#0 libWrapper-wrapper.js:189 callback foundry.js:27723 _handleDragMove foundry.js:28080 _handleMouseMove foundry.js:28052 emit index.js:202 dispatchEvent interaction.min.mjs:8 processPointerMove interaction.min.mjs:8 recursiveFindHit interaction.min.mjs:8 findHit interaction.min.mjs:8 processInteractive interaction.min.mjs:8 onPointerMove interaction.min.mjs:8 commons.js:1703:34 TypeError: e3.actor.data.attributes is undefined getBaseSpeed modules.mjs:74 getRanges modules.mjs:25 getRangesFromSpeedProvider api.js:90 dragRulerGetColorForDistance ruler.js:468 highlightMeasurementTerrainRuler compatibility.js:12 performPostPathfindingActions ruler.js:198 measure ruler.js:133 scheduleMeasurement foundry_imports.js:153 onMouseMove foundry_imports.js:145 onEntityLeftDragMove main.js:159 onEntityLeftDragMoveSnap main.js:153 call_wrapper libWrapper-wrapper.js:616 _onDragLeftMove#0 libWrapper-wrapper.js:189 callback foundry.js:27723 _handleDragMove foundry.js:28080 _handleMouseMove foundry.js:28052 emit index.js:202 dispatchEvent interaction.min.mjs:8 processPointerMove interaction.min.mjs:8 recursiveFindHit interaction.min.mjs:8 findHit interaction.min.mjs:8 processInteractive interaction.min.mjs:8 onPointerMove interaction.min.mjs:8

ckdragons commented 1 year ago

Further testing found the Generic setting under Speed Provider is working. Issue mentioned above seem to be only when the setting is set to Pathfinder 1.

image

ckdragons commented 1 year ago

As per https://gitlab.com/foundryvtt_pathfinder1e/foundryvtt-pathfinder1/-/issues/1784, it would seem that this is an issue with the PF1 system and not Drag Ruler. Possible fix may be implemented with the next PF1 system update.