I'm trying to build a container and retrieve the id of the construction site.
The constructing part works fine, i get an OK as result and see the site on the map.
However, retrieving it directly after the Construction Line fails with different kind of approaches.
With all the tests, i don't see the container. If I wait however one tick, it starts to appear. Why is that and is there any way to retrieve the id directly after creating it?
testBuildContainer: function(room){
var result = room.createConstructionSite(10,10, STRUCTURE_CONTAINER);
console.log("result: " + result);
// Test 1
var room_find_c = room.find(FIND_CONSTRUCTION_SITES);
console.log(JSON.stringify(room_find_c, null, 4));
var room_find_s = room.find(FIND_STRUCTURES);
console.log(JSON.stringify(room_find_s, null, 4));
// Test 2
var room_lookat = room.lookAt(10,10);
console.log(JSON.stringify(room_lookat, null, 4));
// Test 3
console.log(JSON.stringify(room.find(FIND_CONSTRUCTION_SITES,{filter: (i)=> {return i.structureType==STRUCTURE_CONTAINER}}), null,4));
// Test 4
console.log(JSON.stringify(room.find(FIND_STRUCTURES,{filter: (i)=> {return i.structureType==STRUCTURE_CONTAINER}}), null,4));
}