We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c54aa9 commit 35f2b20Copy full SHA for 35f2b20
src/prototype_room_creepbuilder.js
@@ -106,6 +106,8 @@ Room.prototype.spawnCheckForCreate = function() {
106
creep.ttl = creep.ttl || config.creep.queueTtl;
107
if (this.findSpawnsNotSpawning().length === 0) {
108
creep.ttl--;
109
+ } else if (this.energyAvailable === this.energyCapacityAvailable) {
110
+ creep.ttl = 0;
111
}
112
return false;
113
};
@@ -543,7 +545,7 @@ Room.prototype.getCreepConfig = function(creep) {
543
545
Room.prototype.spawnCreateCreep = function(creep) {
544
546
const spawns = this.findSpawnsNotSpawning();
547
if (spawns.length === 0) {
- return;
548
+ return false;
549
550
551
const config = this.getCreepConfig(creep);
0 commit comments