screeps icon indicating copy to clipboard operation
screeps copied to clipboard

[LOGIC REFINE]when in a room which have your controller, but no your spawn, let builder be able to extract energy from everywhere, as it need to rebuild spawn at any cost.

Open XenoAmess opened this issue 3 years ago • 1 comments

XenoAmess avatar Sep 06 '22 05:09 XenoAmess

i understand you point, i would wish to disable this feature, maybe if some config is set like

Room.prototype.isConstructingSpawn = function() {
  if (!this.controller || !this.controller.my || !config.myRoom.enableGetEnergyFromAnyStructures) {
    return false;
  }
  if (this.findPropertyFilter(FIND_MY_STRUCTURES, 'structureType', [STRUCTURE_SPAWN], {}).length > 0) {
    return false;
  }
  return true;
};

Configuration added. please review when you have time.

Have a nice weekend.

XenoAmess avatar Sep 09 '22 21:09 XenoAmess

This pull request was merged by worlddriven.

TooAngel avatar Dec 07 '22 05:12 TooAngel