Fixes subsystem MC crash tracking (#2239)

This commit is contained in:
CitadelStationBot
2017-08-03 08:00:03 -05:00
committed by kevinz000
parent 365fe761a0
commit 4843cbe67d
2 changed files with 3 additions and 2 deletions

View File

@@ -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

View File

@@ -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()