Skip to content

Commit 478f1fa

Browse files
committed
bugfix: don't try to produce cliamer in a room that cannot.
1 parent 277eb35 commit 478f1fa

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/prototype_room_creepbuilder.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ Room.prototype.spawnCheckForCreate = function() {
109109
creep.ttl = creep.ttl || config.creep.queueTtl;
110110
if (this.findSpawnsNotSpawning().length === 0) {
111111
creep.ttl--;
112+
} else if (this.energyAvailable === this.energyCapacityAvailable) {
113+
creep.ttl = 0;
112114
}
113115
return false;
114116
};

0 commit comments

Comments
 (0)