Renewing kills unspawned creeps
Dewey last edited by
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:
> This checks for if(this.spawning), which only checks the StructureSpawn, not the Creep.
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!
Icon last edited by
Associated pull request: https://github.com/screeps/engine/pull/30