diff --git a/src/creep-tasks/prototypes.ts b/src/creep-tasks/prototypes.ts index b12592e..59e2242 100644 --- a/src/creep-tasks/prototypes.ts +++ b/src/creep-tasks/prototypes.ts @@ -104,7 +104,9 @@ Object.defineProperty(RoomPosition.prototype, 'neighbors', { RoomPosition.prototype.isPassible = function (ignoreCreeps = false): boolean { // Is terrain passable? - if (Game.map.getTerrainAt(this) == 'wall') return false; + if (Game.map.getRoomTerrain(this.roomName).get(this.x, this.y) == TERRAIN_MASK_WALL) { + return false; + } if (this.isVisible) { // Are there creeps? if (ignoreCreeps == false && this.lookFor(LOOK_CREEPS).length > 0) return false;