Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C.walls and Roads missing from Game.structures

Tags:

screeps

I'm not sure if I am missing something, but roads and constructed walls are not appearing in Game.structures while ramparts and extensions show up fine. Is this a bug or am I doing something wrong. Here is the code i am using

for(var i in Game.structures){
 var struct = Game.structures[i];    
 var type =  struct.structureType;
 console.log(type);

}

like image 556
user3547018 Avatar asked Dec 25 '22 01:12

user3547018


1 Answers

According to the documentation. Game.structures contains your structures. Walls and roads do not belong to any user, this is why they are not present there.

like image 180
artch Avatar answered Jan 29 '23 00:01

artch