Files
fulpstation/code/controllers/admin.dm
SgtHunk 0e81dab0cf TGU: Agent ID buff, Even more Circuit stuff, Spectroscopy, DBcore subsystem to help with crashes (#238)
* lol 882 conflicts

* build.js never forget

* um

* and this

* sure

* i refuse to see life in black and white

* oh Lord, don't ask me what I mean

* Just say that it's on meeee

* that's just the weight of the world

* of course the british file gives me trouble

fuck you british people

* wow, this is your room? it's so cool!

[png of a bloodsucker lair full of dead bloodless people]

* Make a lot of money and feel dead inside

* tell me you didnt test your code without telling me you didnt test your code

* stay winning

* mech toy repath

* yea

add this to the readme john!!!!! (haha)

* you mean trolling the right-click functions?

* yea

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>

* yea 2

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>

* span macros

* virtual insanity is what we're living

it's aaaalright now

* um

* yeah

* lol

* this makes it compile i think

why beefman code be like this

* i knew it was going to happen i just hoped it wouldn't

* forgot this

Co-authored-by: Enricode <SgtHunk@users.noreply.github.com>
Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
2021-06-29 21:23:35 -06:00

92 lines
2.6 KiB
Plaintext

// Clickable stat() button.
/obj/effect/statclick
name = "Initializing..."
blocks_emissive = NONE
var/target
INITIALIZE_IMMEDIATE(/obj/effect/statclick)
/obj/effect/statclick/Initialize(mapload, text, target)
. = ..()
name = text
src.target = target
if(istype(target, /datum)) //Harddel man bad
RegisterSignal(target, COMSIG_PARENT_QDELETING, .proc/cleanup)
/obj/effect/statclick/Destroy()
target = null
return ..()
/obj/effect/statclick/proc/cleanup()
SIGNAL_HANDLER
qdel(src)
/obj/effect/statclick/proc/update(text)
name = text
return src
/obj/effect/statclick/debug
var/class
/obj/effect/statclick/debug/Click()
if(!usr.client.holder || !target)
return
if(!class)
if(istype(target, /datum/controller/subsystem))
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"
set desc = "Restart one of the various periodic loop controllers for the game (be careful!)"
if(!holder)
return
switch(controller)
if("Master")
Recreate_MC()
SSblackbox.record_feedback("tally", "admin_verb", 1, "Restart Master Controller")
if("Failsafe")
new /datum/controller/failsafe()
SSblackbox.record_feedback("tally", "admin_verb", 1, "Restart Failsafe Controller")
message_admins("Admin [key_name_admin(usr)] has restarted the [controller] controller.")
/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
var/list/controllers = list()
var/list/controller_choices = list()
for (var/datum/controller/controller in world)
if (istype(controller, /datum/controller/subsystem))
continue
controllers["[controller] (controller.type)"] = controller //we use an associated list to ensure clients can't hold references to controllers
controller_choices += "[controller] (controller.type)"
var/datum/controller/controller_string = input("Select controller to debug", "Debug Controller") as null|anything in controller_choices
var/datum/controller/controller = controllers[controller_string]
if (!istype(controller))
return
debug_variables(controller)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Restart Failsafe Controller")
message_admins("Admin [key_name_admin(usr)] is debugging the [controller] controller.")