Add keybinding for the pathfinding feature
This commit is contained in:
+2
-1
@@ -1,4 +1,5 @@
|
||||
import {getCenterFromGridPositionObj} from "./foundry_fixes.js";
|
||||
import { togglePathfinding } from "./keybindings.js";
|
||||
import {settingsKey} from "./settings.js";
|
||||
|
||||
// TODO Wipe cache if walls layer is being modified
|
||||
@@ -7,7 +8,7 @@ let cached_nodes = undefined;
|
||||
export function is_pathfinding_enabled() {
|
||||
if (!game.settings.get(settingsKey, "allowPathfinding"))
|
||||
return false;
|
||||
return game.settings.get(settingsKey, "autoPathfinding") != game.keyboard.isDown("y")
|
||||
return game.settings.get(settingsKey, "autoPathfinding") != togglePathfinding;
|
||||
}
|
||||
|
||||
function get_node(pos, initialize=true) {
|
||||
|
||||
Reference in New Issue
Block a user