From d500fb7a961aa0360a99fd63a4fe4658131004d7 Mon Sep 17 00:00:00 2001 From: itsmeow Date: Tue, 31 Oct 2023 01:35:05 -0500 Subject: [PATCH] Clockcult execute failure protection (#10108) --- code/game/gamemodes/dynamic/dynamic_rulesets_roundstart.dm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/code/game/gamemodes/dynamic/dynamic_rulesets_roundstart.dm b/code/game/gamemodes/dynamic/dynamic_rulesets_roundstart.dm index c8249413d7364..42778885ab1dd 100644 --- a/code/game/gamemodes/dynamic/dynamic_rulesets_roundstart.dm +++ b/code/game/gamemodes/dynamic/dynamic_rulesets_roundstart.dm @@ -608,6 +608,11 @@ main_cult.setup_objectives() //Create team for(var/datum/mind/servant_mind in assigned) + if(!ismob(servant_mind?.current)) // user disconnected and was not assigned a mob. + log_game("DYNAMIC: Clockcult mind \"[servant_mind?.key]\" was lost during execute() - adding a cogscarab.") + assigned -= servant_mind + var/obj/effect/mob_spawn/drone/cogscarab = new(pick_n_take(spawns)) + continue servant_mind.current.forceMove(pick_n_take(spawns)) servant_mind.current.set_species(/datum/species/human) var/datum/antagonist/servant_of_ratvar/S = add_servant_of_ratvar(servant_mind.current, team=main_cult)