|
|
@ -24,7 +24,7 @@ setup_overlord.prototype.run = function () { // TODO somehow these aren't chang
|
|
|
|
let spawn = Game.spawns[this.underlings['spawns']];
|
|
|
|
let spawn = Game.spawns[this.underlings['spawns']];
|
|
|
|
if (spawn.store[RESOURCE_ENERGY] > harvester.min_cost) { // can afford a harvester
|
|
|
|
if (spawn.store[RESOURCE_ENERGY] > harvester.min_cost) { // can afford a harvester
|
|
|
|
console.log("SetupOverlord: Spawn "+spawn.name+" can afford a harvester! ("+harvester.min_cost+") \\o/");
|
|
|
|
console.log("SetupOverlord: Spawn "+spawn.name+" can afford a harvester! ("+harvester.min_cost+") \\o/");
|
|
|
|
let new_harvester_name = harvester.spawn(spawn, this.id+"-0", this.id);
|
|
|
|
let new_harvester_name = harvester.spawn(spawn, this.id+"-"+this.underlings['creeps'].length, this.id);
|
|
|
|
this.add_creep(new_harvester_name);
|
|
|
|
this.add_creep(new_harvester_name);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|