Fixes a few runtimes (#12893)

* Some runtime fixes

* fixes #12892

* Alternative fix. Better behaviour

* qdel atmos thingy when loc is null

* Eye colour init protection

* Whoops. Forgotten /

* Suggestions update

* Fixed a runtime where IPCs losing their arms would cause a runtime in the hand

* Fixes mobs being able to nuzzle a grill to dead and a runtime there

* Added extra logging to the NPCpools
This commit is contained in:
farie82
2020-02-14 22:17:29 -07:00
committed by GitHub
parent df09966258
commit 5b1941e784
10 changed files with 18 additions and 11 deletions
@@ -29,6 +29,7 @@ SUBSYSTEM_DEF(idlenpcpool)
var/mob/living/simple_animal/SA = currentrun[currentrun.len]
--currentrun.len
if(!SA)
log_debug("idlenpcpool encountered an invalid entry, resumed: [resumed], SA [SA], type of SA [SA?.type], null [SA == null], qdelled [QDELETED(SA)], SA in AI_IDLE list: [SA in GLOB.simple_animals[AI_IDLE]]")
GLOB.simple_animals[AI_IDLE] -= SA
continue
+4
View File
@@ -21,6 +21,10 @@ SUBSYSTEM_DEF(npcpool)
while(currentrun.len)
var/mob/living/simple_animal/SA = currentrun[currentrun.len]
--currentrun.len
if(!SA)
log_debug("npcpool encountered an invalid entry, resumed: [resumed], SA [SA], type of SA [SA?.type], null [SA == null], qdelled [QDELETED(SA)], SA in AI_ON list: [SA in GLOB.simple_animals[AI_ON]]")
GLOB.simple_animals[AI_ON] -= SA
continue
if(!SA.ckey && !SA.notransform)
if(SA.stat != DEAD)