diff --git a/Room.Phase1.js b/Room.Phase1.js index 55cc258..50a2656 100644 --- a/Room.Phase1.js +++ b/Room.Phase1.js @@ -44,10 +44,15 @@ let Phase1 = { require('proc.spawning').spawnmover(room) } if((Game.rooms[room].find(FIND_MY_STRUCTURES, {filter: {structureType: STRUCTURE_EXTRACTOR}}).length > 0)&&(creepcounts["miner"] < 1 || creepcounts["miner"]==undefined)&&(Game.rooms[room].energyAvailable >= Game.rooms[room].energyCapacityAvailable)){ +<<<<<<< HEAD if(Game.rooms[room].find(FIND_MINERALS)[0].ticksToRegeneration < 1000){ console.log("Spawning Miner in " + room) require('proc.spawning').spawnminer(room) } else { if(Game.flags.debug && Game.flags.debug.room == Game.rooms[room]){console.log("Not spawning miner in " + room + ", waiting for regen")}} +======= + console.log("Spawning Miner in " + room) + require('proc.spawning').spawnminer(room) +>>>>>>> 1ff4251f0330951b8788d86218fc0b5a1906d5f4 } //require('proc.market').sellEnergy(room) } diff --git a/role.miner.js b/role.miner.js index 5882fed..87ca687 100644 --- a/role.miner.js +++ b/role.miner.js @@ -16,6 +16,7 @@ let roleMiner = { if(creep.harvest(mysource) == ERR_NOT_IN_RANGE) { creep.travelTo(mysource); } +<<<<<<< HEAD } else if ((creep.ticksToLive < 300 || creep.ticksToLive <= creep.memory.renewto) && (Game.rooms[creep.room.name].find(FIND_MY_SPAWNS, {filter: (r) =>{return ( r.store[RESOURCE_ENERGY]>1)}})) ) { if(creep.memory.renewto == undefined){ creep.memory.renewto = 1200 @@ -32,6 +33,9 @@ let roleMiner = { creep.moveTo(spawn); } } else { +======= + } else { +>>>>>>> 1ff4251f0330951b8788d86218fc0b5a1906d5f4 let storagetargets = creep.pos.findClosestByRange(FIND_STRUCTURES, {filter: (s) => {return ((s.structureType == STRUCTURE_STORAGE || s.structureType == STRUCTURE_CONTAINER || s.structureType == STRUCTURE_TERMINAL || s.structureType == STRUCTURE_FACTORY ) && _.sum(s.store) < s.storeCapacity) ;}}); if(storagetargets){ if(this.transferAll(creep,storagetargets) == ERR_NOT_IN_RANGE) {