From 923a3d69b998da12601e8e83a780abc17291a417 Mon Sep 17 00:00:00 2001 From: Runa Dacino Date: Sun, 1 May 2022 08:05:04 +0200 Subject: [PATCH] Makes "Succumb" an IC verb, adds warnings Makes "Succumb" visible, adds warnings Places the "Succumb" verb into the "IC" tab with a description. Using it requires clicking "yes" twice to ensure no accidental use. --- code/modules/mob/living/living.dm | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index f06445165b0..09147c527f0 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -79,14 +79,21 @@ return 1 /mob/living/verb/succumb() - set hidden = 1 -// if ((src.health < 0 && src.health > (5-src.getMaxHealth()))) // Health below Zero but above 5-away-from-death, as before, but variable - if (src.health < 0 && stat != DEAD) + set name = "Succumb to death" + set category = "IC" + set desc = "Press this button if you are in crit and wish to die. Use this sparingly (ending a scene, no medical, etc.)" + var/confirm1 = tgui_alert(usr, "Pressing this button will kill you instantenously! Are you sure you wish to proceed?", "Confirm wish to succumb", list("No","Yes")) + var/confirm2 = "No" + if(confirm1 == "Yes") + confirm2 = tgui_alert(usr, "Pressing this buttom will really kill you, no going back", "Are you sure?", list("Yes", "No")) //Swapped answers to protect from accidental double clicks. + if (src.health < 0 && stat != DEAD && confirm1 == "Yes" && confirm2 == "Yes") // Checking both confirm1 and confirm2 for good measure. I don't trust TGUI. src.death() to_chat(src, "You have given up life and succumbed to death.") else if(stat == DEAD) to_chat(src, "As much as you'd like, you can't die when already dead") + else if(confirm1 == "No" || confirm2 == "No") + to_chat(src, "You chose to live another day.") else to_chat(src, "You are not injured enough to succumb to death!")