Only wipe gridded pathfinding cache when the wall layout changes
This commit is contained in:
+6
-6
@@ -7,7 +7,7 @@ import {disableSnap, registerKeybindings} from "./keybindings.js";
|
||||
import {libWrapper} from "./libwrapper_shim.js";
|
||||
import {performMigrations} from "./migration.js"
|
||||
import {removeLastHistoryEntryIfAt, resetMovementHistory} from "./movement_tracking.js";
|
||||
import {wipeGridlessPathfindingCache} from "./pathfinding.js";
|
||||
import {wipePathfindingCache} from "./pathfinding.js";
|
||||
import {extendRuler} from "./ruler.js";
|
||||
import {registerSettings, RightClickAction, settingsKey} from "./settings.js"
|
||||
import {recalculate} from "./socket.js";
|
||||
@@ -20,11 +20,11 @@ CONFIG.debug.dragRuler = false;
|
||||
export let debugGraphics = undefined;
|
||||
|
||||
initGridlessPathfinding().then(() => {
|
||||
Hooks.on("canvasInit", wipeGridlessPathfindingCache);
|
||||
Hooks.on("canvasReady", wipeGridlessPathfindingCache);
|
||||
Hooks.on("createWall", wipeGridlessPathfindingCache);
|
||||
Hooks.on("updateWall", wipeGridlessPathfindingCache);
|
||||
Hooks.on("deleteWall", wipeGridlessPathfindingCache);
|
||||
Hooks.on("canvasInit", wipePathfindingCache);
|
||||
Hooks.on("canvasReady", wipePathfindingCache);
|
||||
Hooks.on("createWall", wipePathfindingCache);
|
||||
Hooks.on("updateWall", wipePathfindingCache);
|
||||
Hooks.on("deleteWall", wipePathfindingCache);
|
||||
});
|
||||
|
||||
Hooks.once("init", () => {
|
||||
|
||||
Reference in New Issue
Block a user