We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9233bf0 commit 60a24f3Copy full SHA for 60a24f3
src/prototype_room_creepbuilder.js
@@ -57,6 +57,8 @@ Room.prototype.spawnCheckForCreate = function() {
57
creep.ttl = creep.ttl || config.creep.queueTtl;
58
if (this.findSpawnsNotSpawning().length === 0) {
59
creep.ttl--;
60
+ } else if (this.energyAvailable === this.energyCapacityAvailable) {
61
+ creep.ttl = 0;
62
}
63
return false;
64
};
@@ -476,7 +478,7 @@ Room.prototype.getCreepConfig = function(creep) {
476
478
Room.prototype.spawnCreateCreep = function(creep) {
477
479
const spawns = this.findSpawnsNotSpawning();
480
if (spawns.length === 0) {
- return;
481
+ return false;
482
483
484
const config = this.getCreepConfig(creep);
0 commit comments