Fixes round-end report not generating sometimes. (#36679)

* fixes some non-minded mobs breaking roundend report

* actually a better handling
This commit is contained in:
Jordie
2018-03-29 20:03:44 +10:00
committed by CitadelStationBot
parent 77f40b6be9
commit 2aae805c1d
+9 -5
View File
@@ -20,7 +20,7 @@
if(isnewplayer(m))
continue
if(m.mind)
if(m.stat != DEAD && !isbrain(m))
if(m.stat != DEAD && !isbrain(m) && !iscameramob(m))
num_survivors++
mob_data += list("name" = m.name, "ckey" = ckey(m.mind.key))
if(isobserver(m))
@@ -41,9 +41,9 @@
if(iscyborg(L))
var/mob/living/silicon/robot/R = L
mob_data += list("module" = R.module)
else
category = "others"
mob_data += list("typepath" = L.type)
else
category = "others"
mob_data += list("typepath" = m.type)
if(!escaped)
if(EMERGENCY_ESCAPED_OR_ENDGAMED && (m.onCentCom() || m.onSyndieBase()))
escaped = "escapees"
@@ -60,8 +60,12 @@
file_data["[escaped]"]["npcs"]["[initial(m.name)]"] = 1
else
if(isobserver(m))
file_data["[escaped]"] = mob_data
var/pos = length(file_data["[escaped]"]) + 1
file_data["[escaped]"]["[pos]"] = mob_data
else
if(!category)
category = "others"
mob_data += list("name" = m.name, "typepath" = m.type)
var/pos = length(file_data["[escaped]"]["[category]"]) + 1
file_data["[escaped]"]["[category]"]["[pos]"] = mob_data
var/datum/station_state/end_state = new /datum/station_state()