From 8ef717f2e9fc0d579a885133e5b77ad0ded9f5d3 Mon Sep 17 00:00:00 2001 From: "Lila S." Date: Sun, 22 Sep 2024 15:42:03 +0200 Subject: [PATCH] initial --- code/modules/client/verbs/suicide.dm | 5 +++++ config/doppler/config_doppler.txt | 2 ++ modular_doppler/disable_suicide/config_entries.dm | 2 ++ tgstation.dme | 1 + 4 files changed, 10 insertions(+) create mode 100644 modular_doppler/disable_suicide/config_entries.dm diff --git a/code/modules/client/verbs/suicide.dm b/code/modules/client/verbs/suicide.dm index 6e00140b3b438..07e4f934b7962 100644 --- a/code/modules/client/verbs/suicide.dm +++ b/code/modules/client/verbs/suicide.dm @@ -48,6 +48,11 @@ /// 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() + // DOPPLER EDIT ADDITION + if(CONFIG_GET(flag/disable_suicide)) + to_chat(src, span_warning("Suicide is disabled on this server.")) + return FALSE + // DOPPLER EDIT END if(HAS_TRAIT_FROM_ONLY(src, TRAIT_SUICIDED, REF(src))) to_chat(src, span_warning("You are already commiting suicide!")) return FALSE diff --git a/config/doppler/config_doppler.txt b/config/doppler/config_doppler.txt index e70481c4dcfd1..850982e886d2b 100644 --- a/config/doppler/config_doppler.txt +++ b/config/doppler/config_doppler.txt @@ -4,3 +4,5 @@ COMBAT_INDICATOR ## How long until someone can be put in cryo if they are SSD, default is 9000 (15 minutes) CRYO_MIN_SSD_TIME 9000 +## If uncommented, suicide will be disabled. +DISABLE_SUICIDE diff --git a/modular_doppler/disable_suicide/config_entries.dm b/modular_doppler/disable_suicide/config_entries.dm new file mode 100644 index 0000000000000..f70ff724599fc --- /dev/null +++ b/modular_doppler/disable_suicide/config_entries.dm @@ -0,0 +1,2 @@ +// Disables the ability to commit suicide +/datum/config_entry/flag/disable_suicide diff --git a/tgstation.dme b/tgstation.dme index 648e2846d33a4..a71001d553230 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -6513,6 +6513,7 @@ #include "modular_doppler\deforest_medical_items\code\chemicals\twitch.dm" #include "modular_doppler\deforest_medical_items\code\medstation_designs\blood.dm" #include "modular_doppler\deforest_medical_items\code\medstation_designs\medical.dm" +#include "modular_doppler\disable_suicide\config_entries.dm" #include "modular_doppler\emotes\code\emotes.dm" #include "modular_doppler\emotes\code\hologram.dm" #include "modular_doppler\emotes\code\added_emotes\animal_sounds.dm"