Fixed syntax error
This commit is contained in:
parent
840fc18041
commit
2203342421
|
@ -5,7 +5,7 @@ var energyUtils = {
|
||||||
gatherEnergy : function(creep) {
|
gatherEnergy : function(creep) {
|
||||||
let storage;
|
let storage;
|
||||||
if(creep.room.memory.containers > 0){
|
if(creep.room.memory.containers > 0){
|
||||||
storage = creep.room.findClosestByRange(FIND_STRUCTURES, {
|
storage = creep.pos.findClosestByRange(FIND_STRUCTURES, {
|
||||||
filter: (structure) => {
|
filter: (structure) => {
|
||||||
return (structure.structureType == STRUCTURE_CONTAINER) &&
|
return (structure.structureType == STRUCTURE_CONTAINER) &&
|
||||||
structure.store.getUsedCapacity(RESOURCE_ENERGY) > 0;
|
structure.store.getUsedCapacity(RESOURCE_ENERGY) > 0;
|
||||||
|
|
Loading…
Reference in a new issue