We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 271c115 commit 484d3b9Copy full SHA for 484d3b9
role.harvester.js
@@ -21,6 +21,15 @@ var roleHarvester = {
21
if(creep.transfer(targets[0], RESOURCE_ENERGY) == ERR_NOT_IN_RANGE) {
22
creep.moveTo(targets[0], {visualizePathStyle: {stroke: '#ffffff'}});
23
}
24
+ }else{
25
+ var targets = creep.room.find(FIND_STRUCTURES, {
26
+ filter: (structure) => {
27
+ return (structure.structureType == STRUCTURE_EXTENSION ||
28
+ structure.structureType == STRUCTURE_SPAWN ||
29
+ structure.structureType == STRUCTURE_TOWER);
30
+ }
31
+ });
32
+ creep.moveTo(targets[0], {visualizePathStyle: {stroke: '#ffffff'}});
33
34
35
},
0 commit comments