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:
Gamer025
2021-08-19 22:30:39 -07:00
committed by GitHub
parent 91a15fd510
commit 3da51f515d
16 changed files with 169 additions and 37 deletions
+9 -4
View File
@@ -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