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.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/role.builder.js b/src/role.builder.js
index e4964e5..a4fc27f 100644
--- a/src/role.builder.js
+++ b/src/role.builder.js
@@ -5,7 +5,7 @@ module.exports = {
const targets = creep.room.find(FIND_CONSTRUCTION_SITES);
if (targets.length) {
if (creep.build(targets[0]) == ERR_NOT_IN_RANGE) {
- creep.moveTo(targets[0]);
+ move(creep, targets[0]);
}
}
} else {
@@ -16,7 +16,7 @@ module.exports = {
// still filling up
const spawn = Game.spawns['Initial'];
if (creep.transfer(spawn, RESOURCE_ENERGY) == ERR_NOT_IN_RANGE) {
- creep.moveTo(spawn);
+ move(creep, spawn);
}
} else {
creep.memory.state = "building";