diff --git a/code/controllers/subsystem/lobotomy_corp.dm b/code/controllers/subsystem/lobotomy_corp.dm index 3f9391a27491..89cf802641c5 100644 --- a/code/controllers/subsystem/lobotomy_corp.dm +++ b/code/controllers/subsystem/lobotomy_corp.dm @@ -100,7 +100,7 @@ SUBSYSTEM_DEF(lobotomy_corp) /datum/controller/subsystem/lobotomy_corp/Initialize(timeofday) . = ..() - RegisterSignal(SSdcs, COMSIG_GLOB_MOB_DEATH, .proc/OrdealDeathCheck) + RegisterSignal(SSdcs, COMSIG_GLOB_MOB_DEATH, .proc/OnMobDeath) addtimer(CALLBACK(src, .proc/SetGoal), 5 MINUTES) addtimer(CALLBACK(src, .proc/InitializeOrdeals), 60 SECONDS) addtimer(CALLBACK(src, .proc/PickPotentialSuppressions), 60 SECONDS) @@ -370,11 +370,12 @@ SUBSYSTEM_DEF(lobotomy_corp) /datum/controller/subsystem/lobotomy_corp/proc/OnMobDeath(datum/source, mob/living/died, gibbed) SIGNAL_HANDLER if(!(SSmaptype.maptype in list("standard", "skeld", "fishing", "wonderlabs"))) - return + return FALSE if(!ishuman(died)) - return + return FALSE if(OrdealDeathCheck() && !auto_restart_in_progress) OrdealDeathAutoRestart() + return TRUE /// Restarts the round when time reaches 0 /datum/controller/subsystem/lobotomy_corp/proc/OrdealDeathAutoRestart(time = 120 SECONDS) @@ -382,11 +383,12 @@ SUBSYSTEM_DEF(lobotomy_corp) if(!OrdealDeathCheck()) // Yay auto_restart_in_progress = FALSE - return + return FALSE if(time <= 0) message_admins("The round is over because all agents are dead while ordeals are unresolved!") to_chat(world, span_danger("The round is over because all agents are dead while ordeals are unresolved!")) SSticker.force_ending = TRUE - return + return TRUE to_chat(world, span_danger("All agents are dead! If ordeals are left unresolved or new agents don't join, the round will automatically end in [round(time/10)] seconds!")) addtimer(CALLBACK(src, .proc/OrdealDeathAutoRestart, max(0, time - 30 SECONDS)), 30 SECONDS) + return TRUE