mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-26 21:49:11 +01:00
More admin verb conversion & Secrets panel overhaul (#17893)
* More admin verb conversion & Secrets panel overhaul * convert to tsx * Rest of the secrets update * Update secrets.dm * ummm --------- Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
@@ -1,18 +1,24 @@
|
||||
//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
|
||||
name = "Initializing..."
|
||||
blocks_emissive = FALSE
|
||||
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
|
||||
@@ -28,7 +34,7 @@ INITIALIZE_IMMEDIATE(/obj/effect/statclick)
|
||||
class = "subsystem"
|
||||
else if(istype(target, /datum/controller))
|
||||
class = "controller"
|
||||
else if(istype(target, /datum))
|
||||
else if(isdatum(target))
|
||||
class = "datum"
|
||||
else
|
||||
class = "unknown"
|
||||
@@ -36,15 +42,7 @@ INITIALIZE_IMMEDIATE(/obj/effect/statclick)
|
||||
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.Dangerous"
|
||||
set name = "Restart Controller"
|
||||
set desc = "Restart one of the various periodic loop controllers for the game (be careful!)"
|
||||
|
||||
if(!holder)
|
||||
return
|
||||
ADMIN_VERB(restart_controller, R_DEBUG, "Restart Controller", "Restart one of the various periodic loop controllers for the game (be careful!)", ADMIN_CATEGORY_DEBUG, controller in list("Master", "Failsafe"))
|
||||
switch(controller)
|
||||
if("Master")
|
||||
Recreate_MC()
|
||||
@@ -53,25 +51,15 @@ INITIALIZE_IMMEDIATE(/obj/effect/statclick)
|
||||
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_antagonist_template(antag_type in GLOB.all_antag_types)
|
||||
set category = "Debug.Investigate"
|
||||
set name = "Debug Antagonist"
|
||||
set desc = "Debug an antagonist template."
|
||||
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, antag_type in GLOB.all_antag_types)
|
||||
var/datum/antagonist/antag = GLOB.all_antag_types[antag_type]
|
||||
if(antag)
|
||||
usr.client.debug_variables(antag)
|
||||
message_admins("Admin [key_name_admin(usr)] is debugging the [antag.role_text] template.")
|
||||
user.debug_variables(antag)
|
||||
message_admins("Admin [key_name_admin(user)] is debugging the [antag.role_text] template.")
|
||||
|
||||
/client/proc/debug_controller()
|
||||
set category = "Debug.Investigate"
|
||||
set name = "Debug Controller"
|
||||
set desc = "Debug the various subsystems/controllers for the game (be careful!)"
|
||||
|
||||
if(!holder)
|
||||
return
|
||||
ADMIN_VERB(debug_controller, R_DEBUG, "Debug Controller", "Debug the various periodic loop controllers for the game (be careful!)", ADMIN_CATEGORY_DEBUG)
|
||||
var/list/options = list()
|
||||
options["MC"] = Master
|
||||
options["Failsafe"] = Failsafe
|
||||
@@ -97,12 +85,12 @@ INITIALIZE_IMMEDIATE(/obj/effect/statclick)
|
||||
options["LEGACY: cameranet"] = cameranet
|
||||
options["LEGACY: transfer_controller"] = transfer_controller
|
||||
|
||||
var/pick = tgui_input_list(mob, "Choose a controller to debug/view variables of.", "VV controller:", options)
|
||||
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(mob)] is debugging the [pick] controller.")
|
||||
debug_variables(D)
|
||||
message_admins("Admin [key_name_admin(user)] is debugging the [pick] controller.")
|
||||
user.debug_variables(D)
|
||||
@@ -13,10 +13,6 @@ SUBSYSTEM_DEF(nightshift)
|
||||
/datum/controller/subsystem/nightshift/Initialize()
|
||||
if(!CONFIG_GET(flag/enable_night_shifts))
|
||||
can_fire = FALSE
|
||||
/*
|
||||
if(config.randomize_shift_time)
|
||||
GLOB.gametime_offset = rand(0, 23) HOURS
|
||||
*/
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/datum/controller/subsystem/nightshift/fire(resumed = FALSE)
|
||||
@@ -57,7 +53,7 @@ SUBSYSTEM_DEF(nightshift)
|
||||
if(nightshift_active != night_time)
|
||||
update_nightshift(night_time, announcing)
|
||||
|
||||
/datum/controller/subsystem/nightshift/proc/update_nightshift(active, announce = TRUE)
|
||||
/datum/controller/subsystem/nightshift/proc/update_nightshift(active, announce = TRUE, resumed = FALSE, forced = FALSE)
|
||||
nightshift_active = active
|
||||
if(announce)
|
||||
if(active)
|
||||
|
||||
Reference in New Issue
Block a user