From c8a1bd27558a1a689f7b1433e6d5bc66cf61881f Mon Sep 17 00:00:00 2001 From: Lumi Date: Sat, 6 Jul 2019 10:47:38 +1000 Subject: [PATCH 1/3] Allow mouse suicide Lets player controlled mice suicide. --- code/game/verbs/suicide.dm | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/code/game/verbs/suicide.dm b/code/game/verbs/suicide.dm index 8febe20e840..5b3d7e03283 100644 --- a/code/game/verbs/suicide.dm +++ b/code/game/verbs/suicide.dm @@ -229,3 +229,19 @@ setCloneLoss(100, FALSE) updatehealth() + +/mob/living/simple_animal/mouse/verb/suicide() + set hidden = 1 + if(stat == 2) + to_chat(src, "You're already dead!") + return + if(suiciding) + to_chat(src, "You're already committing suicide! Be patient!") + return + + var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No") + + if(confirm == "Yes") + suiciding = 1 + to_chat(viewers(src), "[src] is playing dead permanently! It looks like [p_theyre()] trying to commit suicide.") + adjustOxyLoss(max(100 - getBruteLoss(100), 0)) \ No newline at end of file From 6dba992ca20123ad3dc23494da619f0b5f65ac57 Mon Sep 17 00:00:00 2001 From: Lumi Date: Mon, 8 Jul 2019 17:39:15 +1000 Subject: [PATCH 2/3] Mouse suicide update Update to @KasparoVy's suggestion, tested to work. Thank you to Tayyyyyyy and Couls as well! --- code/game/verbs/suicide.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/verbs/suicide.dm b/code/game/verbs/suicide.dm index 5b3d7e03283..befef870564 100644 --- a/code/game/verbs/suicide.dm +++ b/code/game/verbs/suicide.dm @@ -243,5 +243,5 @@ if(confirm == "Yes") suiciding = 1 - to_chat(viewers(src), "[src] is playing dead permanently! It looks like [p_theyre()] trying to commit suicide.") + visible_message("[src] is playing dead permanently! It looks like [p_theyre()] trying to commit suicide.") adjustOxyLoss(max(100 - getBruteLoss(100), 0)) \ No newline at end of file From 173fbd247025985652e6078760d1691ffcee5f7a Mon Sep 17 00:00:00 2001 From: Lumi Date: Mon, 15 Jul 2019 09:53:12 +1000 Subject: [PATCH 3/3] Updates mouse suicide code Fixing stat == DEAD and suiciding = TRUE, tested to work, thanks Couls!! --- code/game/verbs/suicide.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/game/verbs/suicide.dm b/code/game/verbs/suicide.dm index befef870564..0b171dac199 100644 --- a/code/game/verbs/suicide.dm +++ b/code/game/verbs/suicide.dm @@ -232,7 +232,7 @@ /mob/living/simple_animal/mouse/verb/suicide() set hidden = 1 - if(stat == 2) + if(stat == DEAD) to_chat(src, "You're already dead!") return if(suiciding) @@ -242,6 +242,6 @@ var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No") if(confirm == "Yes") - suiciding = 1 + suiciding = TRUE visible_message("[src] is playing dead permanently! It looks like [p_theyre()] trying to commit suicide.") adjustOxyLoss(max(100 - getBruteLoss(100), 0)) \ No newline at end of file