From 4843cbe67d6519f5c41bcce06b0a16dbef7edcb1 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Thu, 3 Aug 2017 08:00:03 -0500 Subject: [PATCH] Fixes subsystem MC crash tracking (#2239) --- code/controllers/master.dm | 3 ++- code/controllers/subsystem.dm | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/code/controllers/master.dm b/code/controllers/master.dm index c71e34fce3..5ca7b15f72 100644 --- a/code/controllers/master.dm +++ b/code/controllers/master.dm @@ -124,7 +124,8 @@ GLOBAL_REAL(Master, /datum/controller/master) = new var/FireHim = FALSE if(istype(BadBoy)) msg = null - switch(++BadBoy.failure_strikes) + LAZYINITLIST(BadBoy.failure_strikes) + switch(++BadBoy.failure_strikes[BadBoy.type]) if(2) msg = "The [BadBoy.name] subsystem was the last to fire for 2 controller restarts. It will be recovered now and disabled if it happens again." FireHim = TRUE diff --git a/code/controllers/subsystem.dm b/code/controllers/subsystem.dm index 3024c24c15..eee6945c41 100644 --- a/code/controllers/subsystem.dm +++ b/code/controllers/subsystem.dm @@ -31,7 +31,7 @@ var/runlevels = RUNLEVELS_DEFAULT //points of the game at which the SS can fire - var/static/failure_strikes = 0 //How many times we suspect this subsystem has crashed the MC, 3 strikes and you're out! + var/static/list/failure_strikes //How many times we suspect a subsystem type has crashed the MC, 3 strikes and you're out! //Do not override /datum/controller/subsystem/New()