summaryrefslogtreecommitdiff
path: root/src/role.builder.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/role.builder.js')
-rw-r--r--src/role.builder.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/role.builder.js b/src/role.builder.js
index e2649cf..e4964e5 100644
--- a/src/role.builder.js
+++ b/src/role.builder.js
@@ -14,6 +14,7 @@ module.exports = {
} else {
if (creep.carry.energy < creep.carryCapacity) {
// still filling up
+ const spawn = Game.spawns['Initial'];
if (creep.transfer(spawn, RESOURCE_ENERGY) == ERR_NOT_IN_RANGE) {
creep.moveTo(spawn);
}