/* eslint-disable no-undef */ module.exports = { run(creep) { if (Game.spawns.Spawn1.store.getFreeCapacity(RESOURCE_ENERGY) === 0) { if ( creep.transfer( Game.spawns.Spawn1.room.controller, RESOURCE_ENERGY ) === ERR_NOT_IN_RANGE ) { creep.moveTo(Game.spawns.Spawn1.room.controller.pos); } } }, };