Fixed edge case in logic that caused creeps to just sit there

This commit is contained in:
paradizelost 2016-09-15 02:07:39 -05:00
parent e8e8d8a138
commit 9cd8f77f36

View File

@ -11,7 +11,7 @@ var roleHauler = {
}
var sources = creep.room.find(FIND_DROPPED_ENERGY );
if(creep.memory.hauling==false){
if(creep.pickup(sources[0]) == ERR_NOT_IN_RANGE && creep.carryCapacity/2 > creep.carry.energy) {
if(creep.pickup(sources[0]) == ERR_NOT_IN_RANGE && creep.carryCapacity > creep.carry.energy) {
creep.moveTo(sources[0]);
}
}else {