Fixes spawners with defined job descriptions causing the mob spawners list to fill up with null entries (makes spawner menu work again and properly removes ghost roles from latejoin menu when filled) (#7736)

* Fixes the mob spawner list being filled with null entries. (Fixes spawner menu and stops latejoin menu from showing filled ghost roles)

* oop hang on
This commit is contained in:
deathride58
2018-11-18 19:03:00 -05:00
committed by kevinz000
parent c3584f88d0
commit 857c21a378
+2 -3
View File
@@ -65,9 +65,8 @@
/obj/effect/mob_spawn/Destroy()
GLOB.poi_list -= src
var/list/spawners = GLOB.mob_spawners[name]
LAZYREMOVE(spawners, src)
if(!LAZYLEN(spawners))
LAZYREMOVE(GLOB.mob_spawners[name], src)
if(!LAZYLEN(GLOB.mob_spawners[name]))
GLOB.mob_spawners -= name
return ..()