Source keepers lairs part of hostile structures?
-
At least I can't get the using
FIND_HOSTILE_STRUCTURE
To reproduce:
- add a spawn called Spawn1
- add a source keeper lair
- execute following command (for me it returns [])JSON.stringify(Game.spawns.Spawn1.pos.findInRange(FIND_HOSTILE_STRUCTURES, 500))
-
Thanks for reporting, fixed.
-
Not sure, if you can find them like this. My lair detection that worked in survival:
var lairs = room.lookForAtArea('structure', 6, 23, 7, 27); var ticksToSpawn = 10000; _.each(lairs, function (col, y) { _.each(col, function (cell, x) { if (cell.structureType == 'keeperLair') { ticksToSpawn = cell.ticksToSpawn > 0 ? Math.min(ticksToSpawn, cell.ticksToSpawn) : ticksToSpawn; } }); });
-
I don't want to touch these loops to be honest
Just to gain access to the objects it would make the running time just go over n (specific) items instead of 50*50 and then having to iterate the list of (diverse) items on that tile.
-
You could do this once and store id-s of the structures in memory of the room.
-
Anyway, I consider this as fixed, lets move on and let the next problem be a fun one.
-
This bug seems to be back.