From 690376da3a9f5d82d16ba0c3d8b9736b50b1f263 Mon Sep 17 00:00:00 2001 From: GDN <96800819+GDNgit@users.noreply.github.com> Date: Sun, 26 Mar 2023 05:50:27 -0500 Subject: [PATCH] fixes a cult construct death runtime (#20675) * fixes a cult construct runtime * Update code/game/gamemodes/cult/cult_mode.dm Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> --------- Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> --- code/game/gamemodes/cult/cult_mode.dm | 6 ++++-- code/modules/mob/living/simple_animal/constructs.dm | 2 +- code/modules/mob/living/simple_animal/shade.dm | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/code/game/gamemodes/cult/cult_mode.dm b/code/game/gamemodes/cult/cult_mode.dm index 40de63b2fb6..ffe18da4592 100644 --- a/code/game/gamemodes/cult/cult_mode.dm +++ b/code/game/gamemodes/cult/cult_mode.dm @@ -172,11 +172,13 @@ GLOBAL_LIST_EMPTY(all_cults) to_chat(cult_mind.current, "For more information, check the wiki page: ([GLOB.configuration.url.wiki_url]/index.php/Cultist)") return TRUE -/datum/game_mode/proc/remove_cultist(datum/mind/cult_mind, show_message = TRUE, remove_gear = FALSE) +/datum/game_mode/proc/remove_cultist(datum/mind/cult_mind, show_message = TRUE, remove_gear = FALSE, mob/target_mob) if(!(cult_mind in cult)) // Not actually a cultist in the first place return - var/mob/cultist = cult_mind.current + var/mob/cultist = target_mob + if(!cultist) + cultist = cult_mind.current cult -= cult_mind cultist.faction -= "cult" cult_mind.special_role = null diff --git a/code/modules/mob/living/simple_animal/constructs.dm b/code/modules/mob/living/simple_animal/constructs.dm index 25fe7a8909a..4a25931091b 100644 --- a/code/modules/mob/living/simple_animal/constructs.dm +++ b/code/modules/mob/living/simple_animal/constructs.dm @@ -52,7 +52,7 @@ /mob/living/simple_animal/hostile/construct/death(gibbed) . = ..() - SSticker.mode.remove_cultist(mind, FALSE) + SSticker.mode.remove_cultist(show_message = FALSE, target_mob = src) /mob/living/simple_animal/hostile/construct/examine(mob/user) . = ..() diff --git a/code/modules/mob/living/simple_animal/shade.dm b/code/modules/mob/living/simple_animal/shade.dm index 1df0f15bcf4..b5a258e3186 100644 --- a/code/modules/mob/living/simple_animal/shade.dm +++ b/code/modules/mob/living/simple_animal/shade.dm @@ -40,7 +40,7 @@ /mob/living/simple_animal/shade/death(gibbed) . = ..() - SSticker.mode.remove_cultist(mind, FALSE) + SSticker.mode.remove_cultist(show_message = FALSE, target_mob = src) /mob/living/simple_animal/shade/attackby(obj/item/O, mob/user) //Marker -Agouri if(istype(O, /obj/item/soulstone))