mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
# Conflicts: # code/__defines/holomap.dm # code/__defines/mobs.dm # code/_helpers/icons.dm # code/_helpers/unsorted.dm # code/_onclick/hud/hud.dm # code/_onclick/item_attack.dm # code/controllers/Processes/supply.dm # code/controllers/subsystems/planets.dm # code/datums/supplypacks/munitions.dm # code/datums/supplypacks/science.dm # code/datums/supplypacks/security.dm # code/datums/supplypacks/supply.dm # code/game/area/Space Station 13 areas.dm # code/game/atoms_movable.dm # code/game/machinery/autolathe.dm # code/game/machinery/doors/door.dm # code/game/machinery/jukebox.dm # code/game/machinery/recharger.dm # code/game/machinery/vending.dm # code/game/mecha/equipment/tools/medical_tools.dm # code/game/mecha/equipment/weapons/weapons.dm # code/game/objects/items/devices/PDA/PDA.dm # code/game/objects/items/devices/megaphone.dm # code/game/objects/items/poi_items.dm # code/game/objects/items/weapons/implants/implantlanguage.dm # code/game/objects/items/weapons/storage/firstaid.dm # code/game/objects/items/weapons/tools/weldingtool.dm # code/game/objects/structures/flora/trees.dm # code/game/objects/structures/plasticflaps.dm # code/game/supplyshuttle.dm # code/game/turfs/simulated/wall_attacks.dm # code/modules/admin/admin_verbs.dm # code/modules/assembly/infrared.dm # code/modules/client/client procs.dm # code/modules/client/preference_setup/loadout/loadout_utility.dm # code/modules/client/preferences.dm # code/modules/clothing/suits/miscellaneous.dm # code/modules/holomap/holomap_datum.dm # code/modules/holomap/station_holomap.dm # code/modules/integrated_electronics/core/printer.dm # code/modules/mining/machine_processing.dm # code/modules/mob/living/carbon/human/human_defense.dm # code/modules/mob/living/carbon/human/species/virtual_reality/avatar.dm # code/modules/mob/living/death.dm # code/modules/mob/living/silicon/ai/ai.dm # code/modules/mob/living/silicon/pai/pai.dm # code/modules/mob/living/silicon/robot/robot.dm # code/modules/mob/living/simple_animal/animals/parrot.dm # code/modules/mob/mob_movement.dm # code/modules/organs/organ_external.dm # code/modules/organs/organ_icon.dm # code/modules/organs/subtypes/standard.dm # code/modules/planet/weather.dm # code/modules/power/cable.dm # code/modules/power/fusion/core/core_control.dm # code/modules/power/fusion/fuel_assembly/fuel_control.dm # code/modules/power/fusion/gyrotron/gyrotron_control.dm # code/modules/projectiles/gun.dm # code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm # config/names/first_name_skrell.txt # config/names/last_name_skrell.txt # icons/mob/head.dmi # icons/mob/robots.dmi # icons/mob/species/tajaran/helmet.dmi # icons/obj/ammo.dmi # icons/obj/gun.dmi # icons/obj/mining.dmi # icons/obj/projectiles.dmi # icons/obj/rig_modules.dmi # icons/obj/surgery.dmi # icons/turf/walls.dmi # maps/southern_cross/southern_cross-1.dmm # maps/southern_cross/southern_cross-3.dmm # maps/southern_cross/southern_cross-6.dmm # maps/southern_cross/southern_cross-8.dmm # maps/submaps/surface_submaps/mountains/backup/IceCave1.dmm # maps/submaps/surface_submaps/mountains/backup/IceCave1A.dmm # maps/submaps/surface_submaps/mountains/backup/IceCave1B.dmm # maps/submaps/surface_submaps/mountains/backup/IceCave1C.dmm # maps/submaps/surface_submaps/mountains/crashedcontainmentshuttle.dmm # maps/submaps/surface_submaps/mountains/deadspy.dmm # maps/submaps/surface_submaps/mountains/mountains_areas.dm # maps/submaps/surface_submaps/plains/Thiefc.dmm # maps/~map_system/maps.dm # vorestation.dme
161 lines
5.6 KiB
Plaintext
161 lines
5.6 KiB
Plaintext
//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..."
|
|
var/target
|
|
|
|
/obj/effect/statclick/New(loc, text, target) //Don't port this to Initialize it's too critical
|
|
..()
|
|
name = text
|
|
src.target = target
|
|
|
|
/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()
|
|
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_antagonist_template(antag_type in all_antag_types)
|
|
set category = "Debug"
|
|
set name = "Debug Antagonist"
|
|
set desc = "Debug an antagonist template."
|
|
|
|
var/datum/antagonist/antag = 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.")
|
|
|
|
/client/proc/debug_controller(controller in list("Master","Ticker","Ticker Process","Air","Jobs","Sun","Radio","Supply","Shuttles","Emergency Shuttle","Configuration","pAI", "Cameras", "Transfer Controller", "Gas Data","Event","Plants","Alarm","Nano","Chemistry","Vote","Xenobio","Planets"))
|
|
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)
|
|
feedback_add_details("admin_verb","DMC")
|
|
if("Ticker")
|
|
debug_variables(ticker)
|
|
feedback_add_details("admin_verb","DTicker")
|
|
if("Ticker Process")
|
|
debug_variables(tickerProcess)
|
|
feedback_add_details("admin_verb","DTickerProcess")
|
|
if("Air")
|
|
debug_variables(air_master)
|
|
feedback_add_details("admin_verb","DAir")
|
|
if("Jobs")
|
|
debug_variables(job_master)
|
|
feedback_add_details("admin_verb","DJobs")
|
|
if("Sun")
|
|
debug_variables(sun)
|
|
feedback_add_details("admin_verb","DSun")
|
|
if("Radio")
|
|
debug_variables(radio_controller)
|
|
feedback_add_details("admin_verb","DRadio")
|
|
if("Supply")
|
|
debug_variables(supply_controller)
|
|
feedback_add_details("admin_verb","DSupply")
|
|
if("Shuttles")
|
|
debug_variables(shuttle_controller)
|
|
feedback_add_details("admin_verb","DShuttles")
|
|
if("Emergency Shuttle")
|
|
debug_variables(emergency_shuttle)
|
|
feedback_add_details("admin_verb","DEmergency")
|
|
if("Configuration")
|
|
debug_variables(config)
|
|
feedback_add_details("admin_verb","DConf")
|
|
if("pAI")
|
|
debug_variables(paiController)
|
|
feedback_add_details("admin_verb","DpAI")
|
|
if("Cameras")
|
|
debug_variables(cameranet)
|
|
feedback_add_details("admin_verb","DCameras")
|
|
if("Transfer Controller")
|
|
debug_variables(transfer_controller)
|
|
feedback_add_details("admin_verb","DAutovoter")
|
|
if("Gas Data")
|
|
debug_variables(gas_data)
|
|
feedback_add_details("admin_verb","DGasdata")
|
|
if("Event")
|
|
debug_variables(event_manager)
|
|
feedback_add_details("admin_verb", "DEvent")
|
|
if("Plants")
|
|
debug_variables(plant_controller)
|
|
feedback_add_details("admin_verb", "DPlants")
|
|
if("Alarm")
|
|
debug_variables(alarm_manager)
|
|
feedback_add_details("admin_verb", "DAlarm")
|
|
if("Nano")
|
|
debug_variables(GLOB.nanomanager)
|
|
feedback_add_details("admin_verb", "DNano")
|
|
if("Chemistry")
|
|
debug_variables(chemistryProcess)
|
|
feedback_add_details("admin_verb", "DChem")
|
|
if("Vote")
|
|
debug_variables(vote)
|
|
feedback_add_details("admin_verb", "DVote")
|
|
message_admins("Admin [key_name_admin(usr)] is debugging the [controller] controller.")
|
|
return
|
|
|
|
/client/proc/debug_process_scheduler()
|
|
set category = "Debug"
|
|
set name = "Debug Process Scheduler"
|
|
set desc = "Debug the process scheduler itself. For vulpine use only."
|
|
|
|
if(!check_rights(R_DEBUG)) return
|
|
if(config.debugparanoid && !check_rights(R_ADMIN)) return
|
|
debug_variables(processScheduler)
|
|
feedback_add_details("admin_verb", "DProcSchd")
|
|
message_admins("Admin [key_name_admin(usr)] is debugging the process scheduler.")
|
|
|
|
/client/proc/debug_process(controller in processScheduler.nameToProcessMap)
|
|
set category = "Debug"
|
|
set name = "Debug Process Controller"
|
|
set desc = "Debug one of the periodic loop background task controllers for the game (be careful!)"
|
|
|
|
if(!check_rights(R_DEBUG)) return
|
|
if(config.debugparanoid && !check_rights(R_ADMIN)) return
|
|
var/datum/controller/process/P = processScheduler.nameToProcessMap[controller]
|
|
debug_variables(P)
|
|
feedback_add_details("admin_verb", "DProcCtrl")
|
|
message_admins("Admin [key_name_admin(usr)] is debugging the [controller] controller.")
|