diff --git a/section2/role.upgrader.js b/section2/role.upgrader.js index 9b406b2..e07fd43 100644 --- a/section2/role.upgrader.js +++ b/section2/role.upgrader.js @@ -2,7 +2,7 @@ var roleUpgrader = { /** @param {Creep} creep **/ run: function(creep) { - if(creep.store[RESOURCE_ENERGY] == 0) { + if(creep.store[RESOURCE_ENERGY] < 50) { var sources = creep.room.find(FIND_SOURCES); if(creep.harvest(sources[0]) == ERR_NOT_IN_RANGE) { creep.moveTo(sources[0]);