mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 08:37:43 +01:00
The Failsafe can now recover from an deleted MC (#60846)
* The Failsafe can now recover from an deleted MC Its also more reliable and can handle a situation where its main Loop runtimes and the MC is stuck * Reset defcon level correctly Oops left that in from debugging the levels * Correctly recover SSasset * Only decrease defcon if MC creation failed Also add some sort sleep between emergency loops * Makes the last two emergency actions manual procs Since they are kinda unstantable its probalby best if only admins call these manually Its also more reliable and can handle a situation where its main Loop runtimes and the MC is stuck You can also now debug Master/New() While there will most likely never be any situation where the MC is just gone its still good to know that the game can recover from such a situation For example maybe someone messed up a SDQL query or maybe someone wanted to delete the MC to create a new one hoping the Failsafe would do so for him
This commit is contained in:
@@ -324,10 +324,15 @@ SUBSYSTEM_DEF(timer)
|
||||
|
||||
|
||||
/datum/controller/subsystem/timer/Recover()
|
||||
second_queue |= SStimer.second_queue
|
||||
hashes |= SStimer.hashes
|
||||
timer_id_dict |= SStimer.timer_id_dict
|
||||
bucket_list |= SStimer.bucket_list
|
||||
//Find the current timer sub-subsystem in global and recover its buckets etc
|
||||
var/datum/controller/subsystem/timer/timerSS = null
|
||||
for(var/global_var in global.vars)
|
||||
if (istype(global.vars[global_var],src.type))
|
||||
timerSS = global.vars[global_var]
|
||||
second_queue |= timerSS.second_queue
|
||||
hashes |= timerSS.hashes
|
||||
timer_id_dict |= timerSS.timer_id_dict
|
||||
bucket_list |= timerSS.bucket_list
|
||||
|
||||
/**
|
||||
* # Timed Event
|
||||
|
||||
Reference in New Issue
Block a user