Compare commits
65 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7afb1e11de | |||
| 61c48dff5e | |||
| 3c9a86647e | |||
| c928f46f7c | |||
| 09e8ca79b3 | |||
| 833aced2be | |||
| 17d8db6c34 | |||
| 466e5a36d1 | |||
| 8e29cf186b | |||
| dd9a7ecf68 | |||
| 2bf52e62dd | |||
| c11899fb17 | |||
| e2afe05e4e | |||
| 8eb29a4dce | |||
| db7dd1c1c9 | |||
| 0ccfc6ef2f | |||
| f5b0e145ac | |||
| 78b1e8cc4e | |||
| 4d6543174a | |||
| b55af992ec | |||
| 0f288b65d9 | |||
| 9253f3decd | |||
| 188f6c15bf | |||
| 6273f7f8a7 | |||
| 6ce076fa43 | |||
| 1f434b3f6b | |||
| 1e14ff24b0 | |||
| cd61aa948e | |||
| 8817775201 | |||
| 673fa42a20 | |||
| 1ee406a047 | |||
| 08f41ed2ff | |||
| dc85609a75 | |||
| 472b373f13 | |||
| 57ed4d2cc5 | |||
| 81acdc3e63 | |||
| 64bce387d1 | |||
| 6a5c96e425 | |||
| 43c05745c8 | |||
| efc3eb871c | |||
| 8f134a49ba | |||
| e2c7fd992b | |||
| 2e06a2440c | |||
| 1c27f1a4a8 | |||
| 5e96be458e | |||
| b56d4fd14d | |||
| b822ada782 | |||
| b610a00f0f | |||
| fe3efd7fe4 | |||
| 5f971862e8 | |||
| b8c29de841 | |||
| a5b40382d7 | |||
| ce9bea14fc | |||
| a404353d38 | |||
| a132ac2bf3 | |||
| e3a785d8fe | |||
| 6e0571c565 | |||
| 4c006d34c9 | |||
| 9140ef3acf | |||
| 7e19fb95b0 | |||
| c9696f8725 | |||
| 54cebc3192 | |||
| 310014bb8a | |||
| d53399fa1e | |||
| 369159e6bb |
@@ -1,19 +1,3 @@
|
||||
## 1.12.2
|
||||
### Bugfixes
|
||||
- Fixed a bug where the pathfinder on gridless scenes sometimes wasn't able to find a way around corners with specific angles
|
||||
- Pathfinding will now be disabled when the hotkey to move tokens without animation is being pressed, to allow GMs to move their tokens through walls
|
||||
|
||||
|
||||
## 1.12.1
|
||||
### Hotfix
|
||||
- Version 1.12.0 was incorrectly packaged, which caused it to fail to load
|
||||
|
||||
|
||||
## 1.12.0
|
||||
### New features
|
||||
- Pathfinding is now supported on gridless scenes
|
||||
|
||||
|
||||
## 1.11.5
|
||||
### Bugfixes
|
||||
- Fixed a bug that was causing Drag Ruler to spam useless warnings into the console (this was a regression introduced in 1.11.4)
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ wasm_pack = Path("~/.cargo/bin/wasm-pack").expanduser()
|
||||
root_files = ["module.json", "README.md", "CHANGELOG.md", "LICENSE"]
|
||||
wasm_files = ["gridless_pathfinding_bg.wasm", "gridless_pathfinding.js"]
|
||||
output_dir = Path("artifact")
|
||||
copy_everything_directories = ["js", "lang", "templates"]
|
||||
copy_everything_directories = ["js", "lang", "templates", "wasm/snippets"]
|
||||
wasm_dir = Path("wasm")
|
||||
root_dir = Path(".")
|
||||
rust_dir = Path("rust")
|
||||
|
||||
@@ -113,16 +113,6 @@ function handleDisableSnap(event) {
|
||||
|
||||
function handleMoveWithoutAnimation(event) {
|
||||
moveWithoutAnimation = !event.up;
|
||||
|
||||
const ruler = canvas.controls.ruler;
|
||||
if (!ruler?.isDragRuler)
|
||||
return false;
|
||||
if (ruler._state !== Ruler.STATES.MEASURING)
|
||||
return false;
|
||||
|
||||
ruler.measure(getMeasurePosition(), {snap: !disableSnap});
|
||||
ruler.dragRulerSendState();
|
||||
return false;
|
||||
}
|
||||
|
||||
function handleTogglePathfinding(event) {
|
||||
|
||||
+1
-3
@@ -1,5 +1,5 @@
|
||||
import {getGridPositionFromPixelsObj, getPixelsFromGridPositionObj} from "./foundry_fixes.js";
|
||||
import {moveWithoutAnimation, togglePathfinding} from "./keybindings.js";
|
||||
import {togglePathfinding} from "./keybindings.js";
|
||||
import {debugGraphics} from "./main.js";
|
||||
import {settingsKey} from "./settings.js";
|
||||
import {getSnapPointForTokenObj, iterPairs} from "./util.js";
|
||||
@@ -15,8 +15,6 @@ export function isPathfindingEnabled() {
|
||||
return false;
|
||||
if (!game.user.isGM && !game.settings.get(settingsKey, "allowPathfinding"))
|
||||
return false;
|
||||
if (moveWithoutAnimation)
|
||||
return false;
|
||||
return game.settings.get(settingsKey, "autoPathfinding") != togglePathfinding;
|
||||
}
|
||||
|
||||
|
||||
+1
-5
@@ -10,10 +10,6 @@ export const RightClickAction = Object.freeze({
|
||||
ABORT_DRAG:2,
|
||||
});
|
||||
|
||||
function delayedReload() {
|
||||
window.setTimeout(() => location.reload(), 500);
|
||||
}
|
||||
|
||||
export function registerSettings() {
|
||||
game.settings.register(settingsKey, "dataVersion", {
|
||||
scope: "world",
|
||||
@@ -94,7 +90,7 @@ export function registerSettings() {
|
||||
config: true,
|
||||
type: Boolean,
|
||||
default: false,
|
||||
onChange: delayedReload,
|
||||
onChange: () => location.reload(),
|
||||
});
|
||||
|
||||
game.settings.register(settingsKey, "autoPathfinding", {
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@
|
||||
"name": "drag-ruler",
|
||||
"title": "Drag Ruler",
|
||||
"description": "When dragging a token displays a ruler showing how far you've moved that token.",
|
||||
"version": "1.12.2",
|
||||
"version": "1.11.5",
|
||||
"minimumCoreVersion" : "9.245",
|
||||
"compatibleCoreVersion" : "9",
|
||||
"authors": [
|
||||
@@ -65,7 +65,7 @@
|
||||
],
|
||||
"socket": true,
|
||||
"url": "https://github.com/manuelVo/foundryvtt-drag-ruler",
|
||||
"download": "https://github.com/manuelVo/foundryvtt-drag-ruler/releases/download/v1.12.2/drag-ruler-1.12.2.zip",
|
||||
"download": "https://github.com/manuelVo/foundryvtt-drag-ruler/archive/v1.11.5.zip",
|
||||
"manifest": "https://raw.githubusercontent.com/manuelVo/foundryvtt-drag-ruler/master/module.json",
|
||||
"readme": "https://github.com/manuelVo/foundryvtt-drag-ruler/blob/master/README.md",
|
||||
"changelog": "https://github.com/manuelVo/foundryvtt-drag-ruler/blob/master/CHANGELOG.md",
|
||||
|
||||
Generated
+1
-1
@@ -26,7 +26,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "gridless-pathfinding"
|
||||
version = "1.12.2"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"console_error_panic_hook",
|
||||
"js-sys",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "gridless-pathfinding"
|
||||
version = "1.12.2"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
+21
-14
@@ -188,13 +188,18 @@ impl Pathfinder {
|
||||
if angle_diff <= PI {
|
||||
continue;
|
||||
}
|
||||
let angle_between = angle_diff / 2.0 + angle1;
|
||||
nodes.push(calc_pathfinding_node(
|
||||
point,
|
||||
angle_between,
|
||||
distance_from_walls,
|
||||
&mut line_segments,
|
||||
));
|
||||
{
|
||||
let angle_between = angle_diff / 2.0 + angle1;
|
||||
let pathfinding_node = calc_pathfinding_node(
|
||||
point,
|
||||
angle_between,
|
||||
distance_from_walls,
|
||||
&mut line_segments,
|
||||
);
|
||||
if angle_diff > 1.5 * PI {
|
||||
nodes.push(pathfinding_node);
|
||||
}
|
||||
}
|
||||
nodes.push(calc_pathfinding_node(
|
||||
point,
|
||||
angle1 + 0.5 * PI,
|
||||
@@ -214,13 +219,15 @@ impl Pathfinder {
|
||||
if angle_diff <= PI {
|
||||
continue;
|
||||
}
|
||||
let angle_between = angle_diff / 2.0 + angle1;
|
||||
nodes.push(calc_pathfinding_node(
|
||||
point,
|
||||
angle_between,
|
||||
distance_from_walls,
|
||||
&mut line_segments,
|
||||
));
|
||||
if angle_diff > 1.5 * PI {
|
||||
let angle_between = angle_diff / 2.0 + angle1;
|
||||
nodes.push(calc_pathfinding_node(
|
||||
point,
|
||||
angle_between,
|
||||
distance_from_walls,
|
||||
&mut line_segments,
|
||||
));
|
||||
}
|
||||
nodes.push(calc_pathfinding_node(
|
||||
point,
|
||||
angle1 + 0.5 * PI,
|
||||
|
||||
Reference in New Issue
Block a user