fixed wrong vacancy generation bug.

This commit is contained in:
Douwe Ravers
2023-08-26 21:31:29 +02:00
parent e294ad29fe
commit 91448edc0a
3 changed files with 12 additions and 6 deletions

View File

@@ -49,7 +49,7 @@ function buildRoads(){
sId => {
const source = Game.getObjectById(sId);
var roads = [];
roads = roads.concat(source.pos.findPathTo(this.controller));
roads = roads.concat(source.pos.findPathTo(room.controller));
roads.pop();
roads = roads.concat(source.pos.findPathTo(room.find(FIND_MY_STRUCTURES, { filter:{ structureType:STRUCTURE_SPAWN }})[0]));
roads.pop();