From d2f8331b78a60db54998b9f022169dcbd9144791 Mon Sep 17 00:00:00 2001 From: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com> Date: Sat, 15 Jul 2023 16:40:31 -0400 Subject: [PATCH] Makes Suicide properly impossible when the config to disable suicide is active (#22314) * Makes Suicide properly impossible when the config to disable suicide is active * Yeah sure, I'm not the one that had done that code, just moved it. Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> --------- Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> --- code/modules/client/verbs/suicide.dm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/code/modules/client/verbs/suicide.dm b/code/modules/client/verbs/suicide.dm index 06c39c920d3..ad75e7c883f 100644 --- a/code/modules/client/verbs/suicide.dm +++ b/code/modules/client/verbs/suicide.dm @@ -12,12 +12,6 @@ if(!suicide_alert()) return - // SKYRAT EDIT ADDITION - if(CONFIG_GET(flag/disable_suicide)) - to_chat(usr, span_warning("Suicide is disabled on this server.")) - return - // SKYRAT EDIT END - set_suicide(TRUE) send_applicable_messages() final_checkout() @@ -54,6 +48,12 @@ /// Checks if we are in a valid state to suicide (not already suiciding, capable of actually killing ourselves, area checks, etc.) Returns TRUE if we can suicide, FALSE if we can not. /mob/living/proc/can_suicide() + // SKYRAT EDIT ADDITION + if(CONFIG_GET(flag/disable_suicide)) + to_chat(src, span_warning("Suicide is disabled on this server.")) + return FALSE + // SKYRAT EDIT END + if(HAS_TRAIT_FROM_ONLY(src, TRAIT_SUICIDED, REF(src))) to_chat(src, span_warning("You are already commiting suicide!")) return FALSE