mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-10 17:52:36 +00:00
fixes headless suicides (#44711)
This commit is contained in:
@@ -39,19 +39,21 @@
|
|||||||
if(!canSuicide())
|
if(!canSuicide())
|
||||||
return
|
return
|
||||||
if(confirm == "Yes")
|
if(confirm == "Yes")
|
||||||
|
set_suicide(TRUE) //need to be called before calling suicide_act as fuck knows what suicide_act will do with your suicider
|
||||||
var/obj/item/held_item = get_active_held_item()
|
var/obj/item/held_item = get_active_held_item()
|
||||||
if(held_item)
|
if(held_item)
|
||||||
var/damagetype = held_item.suicide_act(src)
|
var/damagetype = held_item.suicide_act(src)
|
||||||
if(damagetype)
|
if(damagetype)
|
||||||
if(damagetype & SHAME)
|
if(damagetype & SHAME)
|
||||||
adjustStaminaLoss(200)
|
adjustStaminaLoss(200)
|
||||||
|
set_suicide(FALSE)
|
||||||
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "shameful_suicide", /datum/mood_event/shameful_suicide)
|
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "shameful_suicide", /datum/mood_event/shameful_suicide)
|
||||||
return
|
return
|
||||||
|
|
||||||
if(damagetype & MANUAL_SUICIDE_NONLETHAL) //Make sure to call the necessary procs if it does kill later
|
if(damagetype & MANUAL_SUICIDE_NONLETHAL) //Make sure to call the necessary procs if it does kill later
|
||||||
|
set_suicide(FALSE)
|
||||||
return
|
return
|
||||||
|
|
||||||
set_suicide(TRUE)
|
|
||||||
suicide_log()
|
suicide_log()
|
||||||
|
|
||||||
var/damage_mod = 0
|
var/damage_mod = 0
|
||||||
@@ -105,7 +107,6 @@
|
|||||||
|
|
||||||
visible_message("<span class='danger'>[suicide_message]</span>", "<span class='userdanger'>[suicide_message]</span>")
|
visible_message("<span class='danger'>[suicide_message]</span>", "<span class='userdanger'>[suicide_message]</span>")
|
||||||
|
|
||||||
set_suicide(TRUE)
|
|
||||||
suicide_log()
|
suicide_log()
|
||||||
|
|
||||||
adjustOxyLoss(max(200 - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0))
|
adjustOxyLoss(max(200 - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0))
|
||||||
|
|||||||
Reference in New Issue
Block a user