diff --git a/baystation12.dme b/baystation12.dme index 863f411da93..9480c6c0398 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -765,6 +765,7 @@ #include "code\modules\admin\verbs\playsound.dm" #include "code\modules\admin\verbs\possess.dm" #include "code\modules\admin\verbs\pray.dm" +#include "code\modules\admin\verbs\profiling.dm" #include "code\modules\admin\verbs\randomverbs.dm" #include "code\modules\admin\verbs\striketeam.dm" #include "code\modules\admin\verbs\striketeam_syndicate.dm" diff --git a/code/ATMOSPHERICS/components/unary/vent_pump.dm b/code/ATMOSPHERICS/components/unary/vent_pump.dm index 9373b1e9119..a72b00fc8c9 100644 --- a/code/ATMOSPHERICS/components/unary/vent_pump.dm +++ b/code/ATMOSPHERICS/components/unary/vent_pump.dm @@ -79,6 +79,7 @@ process() ..() + CHECK_DISABLED(vents) if(stat & (NOPOWER|BROKEN)) return if (!node) diff --git a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm index 99b4a900bbd..c1cf2d88bfc 100644 --- a/code/ATMOSPHERICS/components/unary/vent_scrubber.dm +++ b/code/ATMOSPHERICS/components/unary/vent_scrubber.dm @@ -102,6 +102,7 @@ process() ..() + CHECK_DISABLED(scrubbers) if(stat & (NOPOWER|BROKEN)) return if (!node) diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 8a39e5031bf..7441b54bc54 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -155,7 +155,7 @@ var/list/admin_verbs_debug = list( #ifdef PROFILE_MACHINES /client/proc/cmd_admin_dump_macprofile, #endif - ) + ) + PROFILING_VERBS var/list/admin_verbs_possess = list( /proc/possess, /proc/release diff --git a/code/modules/admin/verbs/profiling.dm b/code/modules/admin/verbs/profiling.dm new file mode 100644 index 00000000000..947fe2003e5 --- /dev/null +++ b/code/modules/admin/verbs/profiling.dm @@ -0,0 +1,25 @@ +var/global/PROFILING_VERBS = list( + /client/proc/disable_scrubbers, + /client/proc/disable_vents, +) +/* +/client/proc/disable_scrubbers() + set category = "Profiling" + set name = "Disable all scrubbers" + + disable_scrubbers = !disable_scrubbers + world << "\red Scrubbers are now [disable_scrubbers?"OFF":"ON"]." +*/ + +#define gen_disable_proc(TYPE,LABEL) \ +/client/proc/disable_##TYPE() { \ + set category = "Profiling"; \ + set name = "Disable all "+LABEL; \ + disable_##TYPE = !disable_##TYPE; \ + world << "\red "+LABEL+" are now [disable_##TYPE?"OFF":"ON"]."; \ + } + +gen_disable_proc(scrubbers,"Scrubbers") +gen_disable_proc(vents, "Vents") + +#undef gen_disable_proc \ No newline at end of file diff --git a/code/setup.dm b/code/setup.dm index 286042d5725..f59afb1ca82 100644 --- a/code/setup.dm +++ b/code/setup.dm @@ -3,6 +3,14 @@ #define DEBUG #define PROFILE_MACHINES // Disable when not debugging. +#ifdef PROFILE_MACHINES +#define CHECK_DISABLED(TYPE) if(disable_##TYPE) return +var/global/disable_scrubbers = 0 +var/global/disable_vents = 0 +#else +#define CHECK_DISABLED(TYPE) /* DO NOTHINK */ +#endif + #define PI 3.1415 #define R_IDEAL_GAS_EQUATION 8.31 //kPa*L/(K*mol)