From cfca580193fa83f5535f0bd4cc9430bbfe35f7bc Mon Sep 17 00:00:00 2001 From: AffectedArc07 Date: Mon, 23 Mar 2020 09:54:41 +0000 Subject: [PATCH] Colours MC subsystems based on state --- code/controllers/subsystem.dm | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/code/controllers/subsystem.dm b/code/controllers/subsystem.dm index b8996f2cf89..e03c0f0187d 100644 --- a/code/controllers/subsystem.dm +++ b/code/controllers/subsystem.dm @@ -181,7 +181,7 @@ if(can_fire) title = "\[[state_letter()]][title]" - stat(title, statclick.update(msg)) + stat(title, "[state_colour()][statclick.update(msg)]") /datum/controller/subsystem/proc/state_letter() switch(state) @@ -196,6 +196,18 @@ if(SS_IDLE) . = " " +/datum/controller/subsystem/proc/state_colour() + switch(state) + if(SS_RUNNING) // If its actively processing, colour it green + . = "" + if(SS_QUEUED) // If its in the running queue, but delayed, colour it orange + . = "" + if(SS_PAUSED, SS_PAUSING) // If its being paused due to lag, colour it red + . = "" + if(SS_SLEEPING) // If fire() slept, colour it blue + . = "" + if(SS_IDLE) // Leave it default if the SS is idle + . = "" //could be used to postpone a costly subsystem for (default one) var/cycles, cycles //for instance, during cpu intensive operations like explosions /datum/controller/subsystem/proc/postpone(cycles = 1)