From 6ac126da0bf448a5fac61ecb6c081608fcdb288a Mon Sep 17 00:00:00 2001 From: GDN <96800819+GDNgit@users.noreply.github.com> Date: Mon, 9 Oct 2023 14:28:31 -0500 Subject: [PATCH] gives runtime access the ability to view timer logs and debug timers (#22451) --- code/controllers/subsystem/SStimer.dm | 5 ++++- code/modules/admin/admin_verbs.dm | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/code/controllers/subsystem/SStimer.dm b/code/controllers/subsystem/SStimer.dm index bf15806b15d..2c1e345994e 100644 --- a/code/controllers/subsystem/SStimer.dm +++ b/code/controllers/subsystem/SStimer.dm @@ -582,7 +582,7 @@ GLOBAL_LIST_EMPTY(timers_by_type) set category = "Debug" set desc = "Shows the log of what types created timers this round" - if(!check_rights(R_DEBUG)) + if(!check_rights(R_DEBUG | R_VIEWRUNTIMES)) return var/list/sorted = sortTim(GLOB.timers_by_type, GLOBAL_PROC_REF(cmp_numeric_dsc), TRUE) @@ -598,6 +598,9 @@ GLOBAL_LIST_EMPTY(timers_by_type) set category = "Debug" set desc = "Shows currently active timers, grouped by callback" + if(!check_rights(R_DEBUG | R_VIEWRUNTIMES)) + return + var/list/timers = list() for(var/id in SStimer.timer_id_dict) var/datum/timedevent/T = SStimer.timer_id_dict[id] diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 6dfda9d3270..550d0a6f356 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -250,7 +250,9 @@ GLOBAL_LIST_INIT(view_runtimes_verbs, list( /client/proc/show_gc_queues, /client/proc/toggle_mctabs, /client/proc/debug_global_variables, - /client/proc/visualise_active_turfs + /client/proc/visualise_active_turfs, + /client/proc/debug_timers, + /client/proc/timer_log )) /client/proc/on_holder_add()