Adds missing runtime viewer Topic calls.

Relocates them to the datum itself rather than it being an admin topic for maximum self-containment.
Also adds 'adminplayerobservefollow', making it possible for admins to not only jump to mobs but also follow them with a single click.
Misc tweaks from Paradise.
This commit is contained in:
PsiOmegaDelta
2016-08-23 17:56:32 +02:00
committed by Yoshax
parent 7573757613
commit c32003e973
4 changed files with 40 additions and 8 deletions

View File

@@ -8,7 +8,7 @@ var/total_runtimes_skipped = 0
#ifdef DEBUG
/world/Error(var/exception/e, var/datum/e_src)
if(!istype(e)) // Something threw an unusual exception
log_to_dd("\[[time2text(world.timeofday, "hh:mm")]] Uncaught exception: [e]")
log_to_dd("\[[time_stamp()]] Uncaught exception: [e]")
return ..()
if(!error_last_seen) // A runtime is occurring too early in start-up initialization
return ..()
@@ -39,7 +39,7 @@ var/total_runtimes_skipped = 0
var/skipcount = abs(error_cooldown[erroruid]) - 1
error_cooldown[erroruid] = 0
if(skipcount > 0)
log_to_dd("\[[time2text(world.timeofday, "hh:mm")]] Skipped [skipcount] runtimes in [e.file],[e.line].")
log_to_dd("\[[time_stamp()]] Skipped [skipcount] runtimes in [e.file],[e.line].")
error_cache.logError(e, skipCount = skipcount)
error_last_seen[erroruid] = world.time
error_cooldown[erroruid] = cooldown
@@ -95,10 +95,24 @@ var/total_runtimes_skipped = 0
desclines += " (This error will now be silenced for [ERROR_SILENCE_TIME / 600] minutes)"
// Now to actually output the error info...
log_to_dd("\[[time2text(world.timeofday, "hh:mm")]] Runtime in [e.file],[e.line]: [e]")
log_to_dd("\[[time_stamp()]] Runtime in [e.file],[e.line]: [e]")
for(var/line in desclines)
log_to_dd(line)
if(error_cache)
error_cache.logError(e, desclines, e_src = e_src)
#endif
/proc/log_runtime(exception/e, datum/e_src, extra_info)
if(!istype(e))
world.Error(e, e_src)
return
if(extra_info)
// Adding extra info adds two newlines, because parsing runtimes is funky
if(islist(extra_info))
e.desc = " [jointext(extra_info, "\n ")]\n\n" + e.desc
else
e.desc = " [extra_info]\n\n" + e.desc
world.Error(e, e_src)