From b8ada37da453d014bf729ea4190bb78773380069 Mon Sep 17 00:00:00 2001 From: Tyrel Souza Date: Tue, 28 Jun 2016 22:50:37 -0400 Subject: [PATCH] change minimums --- main.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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.