Increase screeps count

This commit is contained in:
Anton Vakhrushev 2020-07-21 11:40:46 +03:00
parent 950681a0ed
commit c51647312f
2 changed files with 4 additions and 4 deletions

View File

@ -16,7 +16,7 @@ export function runAsHarvester(creep: Creep) {
let sources = creep.room.find(FIND_SOURCES); let sources = creep.room.find(FIND_SOURCES);
const sourceNum = memory.sourceNum; const sourceNum = memory.sourceNum;
if (creep.harvest(sources[sourceNum]) === ERR_NOT_IN_RANGE) { if (creep.harvest(sources[sourceNum]) === ERR_NOT_IN_RANGE) {
creep.say('To source ' + sourceNum); creep.say('🔄 harvest ' + sourceNum);
creep.moveTo(sources[sourceNum], { visualizePathStyle: { stroke: '#ffaa00' } }); creep.moveTo(sources[sourceNum], { visualizePathStyle: { stroke: '#ffaa00' } });
} }
} else { } else {
@ -33,7 +33,7 @@ export function runAsHarvester(creep: Creep) {
if (targets.length > 0) { if (targets.length > 0) {
if (creep.transfer(targets[0], RESOURCE_ENERGY) === ERR_NOT_IN_RANGE) { if (creep.transfer(targets[0], RESOURCE_ENERGY) === ERR_NOT_IN_RANGE) {
creep.say('to target'); creep.say('🚛 transfer');
creep.moveTo(targets[0], { visualizePathStyle: { stroke: '#ffffff' } }); creep.moveTo(targets[0], { visualizePathStyle: { stroke: '#ffffff' } });
} }
} else { } else {

View File

@ -38,9 +38,9 @@ export const loop = ErrorMapper.wrapLoop(() => {
} }
} }
makeCreep(CreepRole.HARVESTER, 3); makeCreep(CreepRole.HARVESTER, 6);
makeCreep(CreepRole.UPGRADER, 6); makeCreep(CreepRole.UPGRADER, 6);
makeCreep(CreepRole.BUILDER, 4); makeCreep(CreepRole.BUILDER, 6);
// Process current creeps // Process current creeps
for (let name in Game.creeps) { for (let name in Game.creeps) {