Fixes MC tab crashing, debug-controller verb now shows all SS. (#11509)

This commit is contained in:
Matt Atlas
2021-03-21 15:24:34 +01:00
committed by GitHub
parent 323579ba0d
commit 1af39b0f4e
4 changed files with 59 additions and 25 deletions
+1 -1
View File
@@ -178,7 +178,7 @@
return time
//hook for printing stats to the "MC" statuspanel for admins to see performance and related stats etc.
/datum/controller/subsystem/stat_entry(msg)
/datum/controller/subsystem/stat_entry(var/msg)
if(!statclick)
statclick = new/obj/effect/statclick/debug(null, "Initializing...", src)
+12 -23
View File
@@ -8,30 +8,19 @@
usr.client.debug_variables(antag)
message_admins("Admin [key_name_admin(usr)] is debugging the [antag.role_text] template.")
/var/list/controller_debug_list = list(
"Configuration",
"Cameras",
"Gas Data",
"Observation"
)
/client/proc/debug_controller(controller in controller_debug_list)
/client/proc/debug_controller()
set category = "Debug"
set name = "Debug Controller"
set desc = "Debug the various periodic loop controllers for the game (be careful!)"
if(!holder) return
switch(controller)
if("Configuration")
debug_variables(config)
feedback_add_details("admin_verb","DConf")
if("Cameras")
debug_variables(cameranet)
feedback_add_details("admin_verb","DCameras")
if("Gas Data")
debug_variables(gas_data)
feedback_add_details("admin_verb","DGasdata")
if("Observation")
debug_variables(all_observable_events)
feedback_add_details("admin_verb", "DObservation")
message_admins("Admin [key_name_admin(usr)] is debugging the [controller] controller.")
if(!holder)
return
var/list/available_controllers = list()
for(var/datum/controller/subsystem/SS in Master.subsystems)
if (!Master.initializing && SS.flags & SS_NO_DISPLAY)
continue
available_controllers[SS.name] = SS
var/css = input("What controller would you like to debug?", "Controllers") as null|anything in available_controllers
debug_variables(available_controllers[css])
message_admins("Admin [key_name_admin(usr)] is debugging the [css] controller.")