An error occurred while fetching the assigned milestone of the selected merge_request.
cooldown for tower repair and creep.action.idle
3 unresolved threads
3 unresolved threads
- added a cooldown/switch parameter to tower repair and tower urgentRepair
- added a cooldown parameter for creep.action.idle so it will not looking for action in every tick
all of them for save CPU if needed.
Edited by username-removed-1441561
Merge request reports
Activity
Filter activity
added Canary label
14 delete creep.data.targetId; 16 action.step = function (creep) { 17 if (global.CHATTY) 18 creep.say(this.name, global.SAY_PUBLIC); 19 if (creep.getStrategyHandler([action.name], 'idleMove', creep)) 20 creep.idleMove(); 21 22 if (_.isUndefined(creep.data.idleCooldown)) 23 creep.data.idleCooldown = COOLDOWN.CREEP_IDLE; 24 else 25 creep.data.idleCooldown--; 26 27 if (creep.data.idleCooldown === 0) { 28 delete creep.data.actionName; 29 delete creep.data.targetId; 30 delete creep.data.idleCooldown; 1 1 let mod = {}; 2 2 module.exports = mod; 3 mod.loop = function(room){ 3 mod.loop = function (room) { 4 4 var run = tower => this.run(tower); 5 5 _.forEach(room.structures.towers, run); 6 6 }; 7 mod.run = function(tower){ 8 if(tower) { 9 const p = Util.startProfiling(tower.room.name + ':tower:' + tower.id, {enabled:PROFILING.ROOMS}); 7 mod.run = function (tower) {
Please register or sign in to reply