Adds admin verbs for debugging process controllers

* Adds a verb for debugging any of the running process controllers.  Unlike the old debug controller verb, this one is not hard coded, so any present and future processes will be included.  Requires R_DEBUG (and R_ADMIN if in paranoid mode)
* Adds a verb for debugging the process scheduler itself.  This is hidden by default until debug verbs are shown.   Requires R_DEBUG (and R_ADMIN if in paranoid mode)
This commit is contained in:
Leshana
2017-04-11 20:38:29 -04:00
parent 60b9527ed6
commit 70a32fcfc6
4 changed files with 31 additions and 0 deletions

View File

@@ -100,3 +100,26 @@
feedback_add_details("admin_verb", "DXenobio")
message_admins("Admin [key_name_admin(usr)] is debugging the [controller] controller.")
return
/client/proc/debug_process_scheduler()
set category = "Debug"
set name = "Debug Process Scheduler"
set desc = "Debug the process scheduler itself. For vulpine use only."
if(!check_rights(R_DEBUG)) return
if(config.debugparanoid && !check_rights(R_ADMIN)) return
debug_variables(processScheduler)
feedback_add_details("admin_verb", "DProcSchd")
message_admins("Admin [key_name_admin(usr)] is debugging the process scheduler.")
/client/proc/debug_process(controller in processScheduler.nameToProcessMap)
set category = "Debug"
set name = "Debug Process Controller"
set desc = "Debug one of the periodic loop background task controllers for the game (be careful!)"
if(!check_rights(R_DEBUG)) return
if(config.debugparanoid && !check_rights(R_ADMIN)) return
var/datum/controller/process/P = processScheduler.nameToProcessMap[controller]
debug_variables(P)
feedback_add_details("admin_verb", "DProcCtrl")
message_admins("Admin [key_name_admin(usr)] is debugging the [controller] controller.")