Files
VOREStation/code/modules/client/verbs/suicide.dm
T
Selis f4bf017921 Unit Test rework & Master/Ticker update (#17912)
* Unit Test rework & Master/Ticker update

* Fixes and working unit testing

* Fixes

* Test fixes and FA update

* Fixed runtimes

* Radio subsystem

* move that glob wherever later

* ident

* CIBUILDING compile option

* Fixed runtimes

* Some changes to the workflow

* CI Split

* More split

* Pathing

* Linters and Annotators

* ci dir fix

* Missing undef fixed

* Enable grep checks

* More test conversions

* More split

* Correct file

* Removes unneeded inputs

* oop

* More dependency changes

* More conversions

* Conversion fixes

* Fixes

* Some assert fixes

* Corrects start gate

* Converted some README.dms to README.mds

* Removes duplicate proc

* Removes unused defines

* Example configs

* fix dll access viol by double calling

* Post-rebase fixes

* Cleans up names global list

* Undef restart counter

* More code/game/ cleanup

* Statpanel update

* Skybox

* add

* Fix ticker

* Roundend fix

* Persistence dependency update

* Reordering

* Reordering

* Reordering

* Initstage fix

* .

* .

* Reorder

* Reorder

* Circle

* Mobs

* Air

* Test fix

* CI Script Fix

* Configs

* More ticker stuff

* This is now in 'reboot world'

* Restart world announcements

* no glob in PreInit

* to define

* Update

* Removed old include

* Make this file normal again

* moved

* test

* shared unit testing objects

* Updates batched_spritesheets and universal_icon

* .

* job data debug

* rm that

* init order

* show us

* .

* i wonder

* .

* .

* urg

* do we not have a job ID?

* .

* rm sleep for now

* updated rust-g linux binaries

* binaries update 2

* binaries update 3

* testing something

* change that

* test something

* .

* .

* .

* locavar

* test

* move that

* .

* debug

* don't run this test

* strack trace it

* cleaner

* .

* .

* cras again

* also comment this out

* return to official rust g

* Update robot_icons.dm

* monitor the generation

* .

---------

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
2025-08-10 01:37:23 +02:00

97 lines
3.1 KiB
Plaintext

/mob/var/suiciding = 0
/mob/living/carbon/human/verb/suicide() /// At best, useful for admins to see if it's being called.
set hidden = 1
if (stat == DEAD)
to_chat(src, "You're already dead!")
return
if (!SSticker)
to_chat(src, "You can't commit suicide before the game starts!")
return
to_chat(src, span_warning("No. Adminhelp if there is a legitimate reason, and please review our server rules."))
message_admins("[ckey] has tried to trigger the suicide verb as human, but it is currently disabled.")
/mob/living/carbon/brain/verb/suicide()
set hidden = 1
if (stat == 2)
to_chat(src, "You're already dead!")
return
if (!SSticker)
to_chat(src, "You can't commit suicide before the game starts!")
return
if (suiciding)
to_chat(src, "You're already committing suicide! Be patient!")
return
var/confirm = tgui_alert(src, "Are you sure you want to commit suicide?", "Confirm Suicide", list("Yes", "No"))
if(confirm == "Yes")
suiciding = 1
to_chat(viewers(loc),span_danger("[src]'s brain is growing dull and lifeless. It looks like it's lost the will to live."))
spawn(50)
death(0)
suiciding = 0
/mob/living/silicon/ai/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 = tgui_alert(src, "Are you sure you want to commit suicide?", "Confirm Suicide", list("Yes", "No"))
if(confirm == "Yes")
suiciding = 1
to_chat(viewers(src),span_danger("[src] is powering down. It looks like they're trying to commit suicide."))
//put em at -175
adjustOxyLoss(max(getMaxHealth() * 2 - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0))
updatehealth()
/mob/living/silicon/robot/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 = tgui_alert(src, "Are you sure you want to commit suicide?", "Confirm Suicide", list("Yes", "No"))
if(confirm == "Yes")
suiciding = 1
to_chat(viewers(src),span_danger("[src] is powering down. It looks like they're trying to commit suicide."))
//put em at -175
adjustOxyLoss(max(getMaxHealth() * 2 - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0))
updatehealth()
/*
/mob/living/silicon/pai/verb/suicide()
set category = "Abilities.pAI Commands"
set desc = "Kill yourself and become a ghost (You will receive a confirmation prompt)"
set name = "pAI Suicide"
var/answer = tgui_alert(src, "REALLY kill yourself? This action can't be undone.", "Suicide", list("Yes","No"))
if(answer == "Yes")
var/obj/item/paicard/card = loc
card.removePersonality()
var/turf/T = get_turf_or_move(card.loc)
for (var/mob/M in viewers(T))
M.show_message(span_notice("[src] flashes a message across its screen, \"Wiping core files. Please acquire a new personality to continue using pAI device functions.\""), 3, span_notice("[src] bleeps electronically."), 2)
death(0)
else
to_chat(src, "Aborting suicide attempt.")
*/