screep/path.js

8 lines
297 B
JavaScript

module.exports = {
visualPath(my_pos, target_pos) {
// visualize the path
const path = PathFinder.search(my_pos, target_pos).path;
// console.log(path)
Game.map.visual.poly(path, { stroke: '#ffffff', strokeWidth: .8, opacity: .2, lineStyle: 'dashed' });
}
}