diff --git a/main.js b/main.js index 94a8464..9fdc350 100644 --- a/main.js +++ b/main.js @@ -7,17 +7,17 @@ var creepRolePriority = ['harvester', 'builder', 'upgrader']; var creepsConfig = { harvester: { bodyParts: [WORK, CARRY, MOVE, MOVE], - minimumCreeps: 3, + minimumCreeps: 6, role: roleHarvester }, builder: { bodyParts: [WORK, CARRY, MOVE, MOVE], - minimumCreeps: 3, + minimumCreeps: 1, role: roleBuilder }, upgrader: { bodyParts: [WORK, CARRY, MOVE, MOVE], - minimumCreeps: 3, + minimumCreeps: 1, role: roleUpgrader } }; @@ -39,7 +39,7 @@ module.exports.loop = function(){ var roleName = creepRolePriority[i]; var defaults = creepsConfig[roleName]; - var creepsOfKind = _.filter(Game.creeps, (creep) => {return creep.memory.role == roleName}); + let creepsOfKind = _.filter(Game.creeps, (creep) => {return creep.memory.role == roleName}); if (creepsOfKind.length < defaults.minimumCreeps){ var newName = Game.spawns.Spawn1.createCreep(defaults.bodyParts, helpers.generateName(roleName), // Make names show the roles. Change me to undefined if this gets annoying.