Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var target = creep.pos.findClosestByPath(FIND_STRUCTURES, {
- filter: function(object) {
- return object.hits < object.hitsMax && object.structureType === STRUCTURE_ROAD;
- }
- });
- if(target) {
- creep.say('repairing');
- creep.moveTo(target);
- creep.repair(target);
- }
Advertisement
Add Comment
Please, Sign In to add comment