Changed miner movement;
This commit is contained in:
@@ -55,7 +55,7 @@ function energyEmptyCheck(creep){
|
||||
|
||||
function findEnergyTarget(creep){
|
||||
var target;
|
||||
if(creep.room.storage.store.getUsedCapacity(RESOURCE_ENERGY) > creep.store.getFreeCapacity(RESOURCE_ENERGY))
|
||||
if(creep.room.storage && creep.room.storage.store.getUsedCapacity(RESOURCE_ENERGY) > creep.store.getFreeCapacity(RESOURCE_ENERGY))
|
||||
target = creep.room.storage;
|
||||
if(!target) target = creep.pos.findClosestByRange(FIND_STRUCTURES, {
|
||||
filter: (st)=>{
|
||||
|
||||
Reference in New Issue
Block a user