Merge pull request #1929 from CHOMPStationBot/upstream-merge-10286

[MIRROR] Adds subsystem crash logging to SSprocess and SSmobs
This commit is contained in:
Nadyr
2021-05-11 23:10:20 -04:00
committed by GitHub
5 changed files with 136 additions and 0 deletions

View File

@@ -1656,3 +1656,36 @@ GLOBAL_REAL_VAR(list/stack_trace_storage)
/proc/CallAsync(datum/source, proctype, list/arguments)
set waitfor = FALSE
return call(source, proctype)(arglist(arguments))
/proc/describeThis(var/datum/D)
if(istype(D))
var/msg = "[D.type] - [D]"
if(isatom(D))
var/atom/A = D
if(!A.z)
msg += " - Coords unavailable (in contents?)"
if(ismovable(A))
var/turf/T = get_turf(A)
if(T)
msg += " - Parent turf: [T.x],[T.y],[T.z]"
else
msg += " - In nullspace"
else
msg += " - In nullspace"
else
msg += "- [A.x],[A.y],[A.z]"
return msg
else if(isnull(D))
return "NULL"
else if(istext(D))
return "TEXT: [D]"
else if(isnum(D))
return "NUM: [D]"
else if(ispath(D))
return "PATH: [D]"
else if(islist(D))
return "LIST: [D]"
else if(isclient(D))
return "CLIENT: [D]"
else
return "Unknown data type: [D]"