mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 18:44:48 +01:00
Cleans up last words (#26546)
This commit is contained in:
@@ -297,25 +297,26 @@
|
||||
to_chat(src, "<span class='warning'>You are unable to succumb to death! This life continues!</span>")
|
||||
return
|
||||
|
||||
var/last_words = tgui_input_text(src, "Do you have any last words?", "Goodnight, Sweet Prince", encode = FALSE)
|
||||
last_words = null // In case we kept some from last time
|
||||
var/final_words = tgui_input_text(src, "Do you have any last words?", "Goodnight, Sweet Prince", encode = FALSE)
|
||||
|
||||
if(isnull(last_words) && cancel_on_no_words)
|
||||
if(isnull(final_words) && cancel_on_no_words)
|
||||
to_chat(src, "<span class='notice'>You decide you aren't quite ready to die.</span>")
|
||||
return
|
||||
|
||||
if(stat == DEAD)
|
||||
// cancel em out if they died while they had the message box up
|
||||
last_words = null
|
||||
return
|
||||
|
||||
if(health >= HEALTH_THRESHOLD_CRIT)
|
||||
to_chat(src, "<span class='warning'>You are unable to succumb to death! This life continues!</span>")
|
||||
last_words = null
|
||||
return
|
||||
if(!isnull(last_words))
|
||||
create_log(MISC_LOG, "gave their final words, [last_words]")
|
||||
src.last_words = last_words // sorry
|
||||
whisper(last_words)
|
||||
|
||||
add_attack_logs(src, src, "[src] has [!isnull(last_words) ? "whispered [p_their()] final words" : "succumbed to death"] with [round(health, 0.1)] points of health!")
|
||||
if(!isnull(final_words))
|
||||
create_log(MISC_LOG, "gave their final words, [last_words]")
|
||||
last_words = final_words
|
||||
whisper(final_words)
|
||||
|
||||
add_attack_logs(src, src, "[src] has [!isnull(final_words) ? "whispered [p_their()] final words" : "succumbed to death"] with [round(health, 0.1)] points of health!")
|
||||
|
||||
create_log(MISC_LOG, "has succumbed to death with [round(health, 0.1)] points of health")
|
||||
adjustOxyLoss(max(health - HEALTH_THRESHOLD_DEAD, 0))
|
||||
@@ -325,7 +326,8 @@
|
||||
if(health < HEALTH_THRESHOLD_DEAD)
|
||||
break
|
||||
take_overall_damage(max(5, health - HEALTH_THRESHOLD_DEAD), 0)
|
||||
if(!isnull(last_words))
|
||||
|
||||
if(!isnull(final_words))
|
||||
addtimer(CALLBACK(src, PROC_REF(death)), 1 SECONDS)
|
||||
else
|
||||
death()
|
||||
@@ -335,7 +337,6 @@
|
||||
/mob/living/proc/InCritical()
|
||||
return (health < HEALTH_THRESHOLD_CRIT && health > HEALTH_THRESHOLD_DEAD && stat == UNCONSCIOUS)
|
||||
|
||||
|
||||
/mob/living/ex_act(severity)
|
||||
..()
|
||||
flash_eyes()
|
||||
|
||||
Reference in New Issue
Block a user