Fixed syntax error

This commit is contained in:
ObeseTermite 2025-06-10 08:47:43 -07:00
parent 840fc18041
commit 2203342421

View file

@ -5,7 +5,7 @@ var energyUtils = {
gatherEnergy : function(creep) {
let storage;
if(creep.room.memory.containers > 0){
storage = creep.room.findClosestByRange(FIND_STRUCTURES, {
storage = creep.pos.findClosestByRange(FIND_STRUCTURES, {
filter: (structure) => {
return (structure.structureType == STRUCTURE_CONTAINER) &&
structure.store.getUsedCapacity(RESOURCE_ENERGY) > 0;