mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 21:48:39 +01:00
Rework Master Controller, Failsafe, and Subsystem code
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
//TODO: rewrite and standardise all controller datums to the datum/controller type
|
||||
//TODO: allow all controllers to be deleted for clean restarts (see WIP master controller stuff) - MC done - lighting done
|
||||
|
||||
// Clickable stat() button.
|
||||
/obj/effect/statclick
|
||||
var/target
|
||||
|
||||
@@ -23,12 +21,16 @@
|
||||
class = "subsystem"
|
||||
else if(istype(target, /datum/controller))
|
||||
class = "controller"
|
||||
else if(istype(target, /datum))
|
||||
class = "datum"
|
||||
else
|
||||
class = "unknown"
|
||||
|
||||
usr.client.debug_variables(target)
|
||||
message_admins("Admin [key_name_admin(usr)] is debugging the [target] [class].")
|
||||
|
||||
|
||||
// Debug verbs.
|
||||
/client/proc/restart_controller(controller in list("Master", "Failsafe"))
|
||||
set category = "Debug"
|
||||
set name = "Restart Controller"
|
||||
@@ -38,36 +40,11 @@
|
||||
return
|
||||
switch(controller)
|
||||
if("Master")
|
||||
new /datum/controller/game_controller()
|
||||
master_controller.process()
|
||||
new/datum/controller/master()
|
||||
Master.process()
|
||||
feedback_add_details("admin_verb","RMC")
|
||||
if("Failsafe")
|
||||
new /datum/controller/failsafe()
|
||||
feedback_add_details("admin_verb","RFailsafe")
|
||||
|
||||
message_admins("Admin [key_name_admin(usr)] has restarted the [controller] controller.")
|
||||
|
||||
/client/proc/debug_controller(controller in list("Master", "Failsafe", "Ticker", "Jobs", "Radio", "Configuration", "Cameras"))
|
||||
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("Master")
|
||||
debug_variables(master_controller)
|
||||
if("Failsafe")
|
||||
debug_variables(Failsafe)
|
||||
if("Ticker")
|
||||
debug_variables(ticker)
|
||||
if("Jobs")
|
||||
debug_variables(SSjob)
|
||||
if("Radio")
|
||||
debug_variables(radio_controller)
|
||||
if("Configuration")
|
||||
debug_variables(config)
|
||||
if("Cameras")
|
||||
debug_variables(cameranet)
|
||||
|
||||
message_admins("Admin [key_name_admin(usr)] is debugging the [controller] controller.")
|
||||
|
||||
Reference in New Issue
Block a user