Renewing kills unspawned creeps
-
I figured out why my creeps were disappearing. I'm able to "renew" creeps while they're still spawning by using a different spawn. The affect of this is in the screenshot attached (TTL goes from undefined to -17850488). When it spawns, the creep immediately disappears (no energy dropped).
See https://screeps.com/a/#!/history/W73N64?t=17850234 - the bottom most spawn.
Players Icon & Vaejor were able to help me pinpoint the engine code:
https://github.com/screeps/engine/blob/master/src/game/structures.js#L1132
> This checks for if(this.spawning), which only checks the StructureSpawn, not the Creep.https://github.com/screeps/engine/blob/master/src/processor/intents/spawns/renew-creep.js
> Same here________________
I'm no engine expert, but the discussion we had suggested that the check should be done twice. First is structures.js to check via the API for creep.spawning and return ERR_BUSY. The other is in the renew intent, to check whether the creep actually spawning.
________________I've lost many good honest creeps to this. Please think of the creeps and fix this soon!
Dewey
-
Associated pull request: https://github.com/screeps/engine/pull/30