We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c0827f2 commit 8396941Copy full SHA for 8396941
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
};
@@ -481,7 +483,7 @@ Room.prototype.getCreepConfig = function(creep) {
481
483
Room.prototype.spawnCreateCreep = function(creep) {
482
484
const spawns = this.findSpawnsNotSpawning();
485
if (spawns.length === 0) {
- return;
486
+ return false;
487
488
489
const config = this.getCreepConfig(creep);
0 commit comments