Files
screeps-scripts/src/utils/funcs/checkPosition.ts

6 lines
227 B
TypeScript

export const checkPositionWalkable = (pos: RoomPosition) => {
// Check if the position is not obstructed by a wall
const terrain = pos.lookFor(LOOK_TERRAIN);
return terrain.length === 0 || terrain[0] !== 'wall';
};