Files
VOREStation/code/controllers/admin.dm
T
Will 7c84aaee4b Paicontroller subsystem port (#19165)
* to subsystem

* wip subsystem pain

* some big recoding

* seperated

* oop

* fucking lua

* working on tgui foundation

* compile fixes

* nice and clean

* type

* inviting works

* unit testing

* agony

* test good

* typo

* that should be the basics

* Complete recode of pai saving

* restore fluff text

* migration

* pai notification automation

* swap

* length

* more fixes

* pai sprite datums

* type 13 uses all four directions

* eye handling

* use accessors

* working on icontests

* fix

* hologram eye test

* oop

* wait that doesn't work at all

* text

* eye colors and holo eyes

* lots of fixes

* fix those up

* organized

* belly cap

* that too

* death sprites

* resting eyes

* resting flag

* bad check here

* fixing icon files

* proper file

* garble

* fix some states

* pai death

* collapse pai files into single file

* allow some restricted pai interactions

* lamp

* block invites button

* collapse in remaining vr file

* this is actually needed

* documenting and organizing

* update to TGprefs

* remove gun toggle verb on pai

* forbid default name joins

* pai cable retraction

* various pai fixes

* icon forge pai

* pai eyes

* type 13 iconstate

* directionless

* small fix

* pai dir fix

* missing icon

* no fresh pais

* oops

* fixed pai join

* fixed change chassis

* pai UI

* .

* .

* reuse

* .

* .

* .

* push that

* Horro rmasks

* pai invite data change

* splitting

* use refs

* initial

* with PAI

* soem more

* .

* .

* .

* .

* ugh

* next

* pai invite

* only preview

* that

* use from char pref

* fixed pai invite not working

* small tgui fixes

* remove temp code

* .

* pai comments properly sent

* ooc

* horror

* need to use this for now

* .

* fix

* lol

* raw mob spawn fix

* pai software

* push

---------

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
2026-03-03 23:59:27 +01:00

95 lines
3.2 KiB
Plaintext

// Clickable stat() button.
/obj/effect/statclick
name = "Initializing..."
blocks_emissive = FALSE // EMISSIVE_BLOCK_NONE
var/target
INITIALIZE_IMMEDIATE(/obj/effect/statclick)
/obj/effect/statclick/Initialize(mapload, text, target)
. = ..()
name = text
src.target = target
/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(!check_rights_for(usr.client, R_HOLDER) || !target)
return
if(!class)
if(istype(target, /datum/controller/subsystem))
class = "subsystem"
else if(istype(target, /datum/controller))
class = "controller"
else if(isdatum(target))
class = "datum"
else
class = "unknown"
usr.client.debug_variables(target)
message_admins("Admin [key_name_admin(usr)] is debugging the [target] [class].")
ADMIN_VERB(restart_controller, R_DEBUG, "Restart Controller", "Restart one of the various periodic loop controllers for the game (be careful!)", ADMIN_CATEGORY_DEBUG_GAME, controller in list("Master", "Failsafe"))
switch(controller)
if("Master")
Recreate_MC()
feedback_add_details("admin_verb","RMC")
if("Failsafe")
new /datum/controller/failsafe()
feedback_add_details("admin_verb","RFailsafe")
message_admins("Admin [key_name_admin(user)] has restarted the [controller] controller.")
ADMIN_VERB(debug_antagonist_template, R_DEBUG, "Debug Antagonist", "Debug an antagonist template", ADMIN_CATEGORY_DEBUG_GAME, antag_type in GLOB.all_antag_types)
var/datum/antagonist/antag = GLOB.all_antag_types[antag_type]
if(antag)
user.debug_variables(antag)
message_admins("Admin [key_name_admin(user)] is debugging the [antag.role_text] template.")
ADMIN_VERB(debug_controller, R_DEBUG, "Debug Controller", "Debug the various periodic loop controllers for the game (be careful!)", ADMIN_CATEGORY_DEBUG_GAME)
var/list/options = list()
options["MC"] = Master
options["Failsafe"] = Failsafe
options["Configuration"] = config
for(var/datum/controller/subsystem/S as anything in Master.subsystems)
if(!istype(S)) //Eh, we're a debug verb, let's have typechecking.
continue
var/strtype = "SS[get_end_section_of_type(S.type)]"
if(options[strtype])
var/offset = 2
while(istype(options["[strtype]_[offset] - DUPE ERROR"], /datum/controller/subsystem))
offset++
options["[strtype]_[offset] - DUPE ERROR"] = S //Something is very, very wrong.
else
options[strtype] = S
//Goon PS stuff, and other yet-to-be-subsystem things.
options["LEGACY: master_controller"] = GLOB.master_controller
options["LEGACY: job_master"] = GLOB.job_master
options["LEGACY: emergency_shuttle"] = GLOB.emergency_shuttle
options["LEGACY: cameranet"] = GLOB.cameranet
options["LEGACY: transfer_controller"] = GLOB.transfer_controller
var/pick = tgui_input_list(user, "Choose a controller to debug/view variables of.", "VV controller:", options)
if(!pick)
return
var/datum/D = options[pick]
if(!istype(D))
return
feedback_add_details("admin_verb", "DebugController")
message_admins("Admin [key_name_admin(user)] is debugging the [pick] controller.")
user.debug_variables(D)