From 65bd3d67c75ce2383a37cc1d6c9f8c5d85e37a29 Mon Sep 17 00:00:00 2001 From: Uristthedorf <40842973+Uristthedorf@users.noreply.github.com> Date: Wed, 18 Jun 2025 22:23:54 -0700 Subject: [PATCH] Replaces deprecated function --- init_dist/node_modules/@screeps/simplebot/src/building.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init_dist/node_modules/@screeps/simplebot/src/building.js b/init_dist/node_modules/@screeps/simplebot/src/building.js index 1c16919..313ff55 100644 --- a/init_dist/node_modules/@screeps/simplebot/src/building.js +++ b/init_dist/node_modules/@screeps/simplebot/src/building.js @@ -4,7 +4,7 @@ function getRandomFreePos(startPos, distance) { x = startPos.x + Math.floor(Math.random()*(distance*2+1)) - distance; y = startPos.y + Math.floor(Math.random()*(distance*2+1)) - distance; } - while((x+y)%2 != (startPos.x+startPos.y)%2 || Game.map.getTerrainAt(x,y,startPos.roomName) == 'wall'); + while((x+y)%2 != (startPos.x+startPos.y)%2 || Game.map.getRoomTerrain(startPos.roomName).get(x,y) == 1); //'1' means wall. return new RoomPosition(x,y,startPos.roomName); }