mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Removes tactical suicide borging (#40754)
* Removes tactical suicide borging * correction
This commit is contained in:
committed by
yogstation13-bot
parent
86311ee990
commit
deeef5d59c
@@ -262,4 +262,7 @@
|
||||
// /obj/item/bodypart on_mob_life() retval flag
|
||||
#define BODYPART_LIFE_UPDATE_HEALTH (1<<0)
|
||||
|
||||
#define MAX_REVIVE_FIRE_DAMAGE 180
|
||||
#define MAX_REVIVE_BRUTE_DAMAGE 180
|
||||
|
||||
#define HUMAN_FIRE_STACK_ICON_NUM 3
|
||||
|
||||
@@ -210,7 +210,7 @@
|
||||
|
||||
H.set_cloned_appearance()
|
||||
|
||||
H.suiciding = FALSE
|
||||
H.set_suicide(FALSE)
|
||||
attempting = FALSE
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
|
||||
H.set_cloned_appearance()
|
||||
|
||||
H.suiciding = FALSE
|
||||
H.set_suicide(FALSE)
|
||||
attempting = FALSE
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -437,8 +437,18 @@
|
||||
do_help(H, user)
|
||||
|
||||
/obj/item/twohanded/shockpaddles/proc/can_defib(mob/living/carbon/H)
|
||||
if(H.suiciding || H.has_trait(TRAIT_NOCLONE) || H.hellbound)
|
||||
return
|
||||
if((world.time - H.timeofdeath) > tlimit)
|
||||
return
|
||||
if((H.getBruteLoss() >= MAX_REVIVE_BRUTE_DAMAGE) || (H.getFireLoss() >= MAX_REVIVE_FIRE_DAMAGE))
|
||||
return
|
||||
if(!H.getorgan(/obj/item/organ/heart))
|
||||
return
|
||||
var/obj/item/organ/brain/BR = H.getorgan(/obj/item/organ/brain)
|
||||
return (!H.suiciding && !(H.has_trait(TRAIT_NOCLONE)) && !H.hellbound && ((world.time - H.timeofdeath) < tlimit) && (H.getBruteLoss() < 180) && (H.getFireLoss() < 180) && H.getorgan(/obj/item/organ/heart) && BR && !BR.damaged_brain)
|
||||
if(QDELETED(BR) || BR.damaged_brain || BR.suicided)
|
||||
return
|
||||
return TRUE
|
||||
|
||||
/obj/item/twohanded/shockpaddles/proc/shock_touching(dmg, mob/H)
|
||||
if(isliving(H.pulledby)) //CLEAR!
|
||||
@@ -567,14 +577,19 @@
|
||||
failed = "<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Body has decayed for too long. Further attempts futile.</span>"
|
||||
else if (!H.getorgan(/obj/item/organ/heart))
|
||||
failed = "<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Patient's heart is missing.</span>"
|
||||
else if(total_burn >= 180 || total_brute >= 180)
|
||||
else if(total_burn >= MAX_REVIVE_FIRE_DAMAGE || total_brute >= MAX_REVIVE_BRUTE_DAMAGE)
|
||||
failed = "<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Severe tissue damage makes recovery of patient impossible via defibrillator. Further attempts futile.</span>"
|
||||
else if(H.get_ghost())
|
||||
failed = "<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - No activity in patient's brain. Further attempts may be successful.</span>"
|
||||
else
|
||||
var/obj/item/organ/brain/BR = H.getorgan(/obj/item/organ/brain)
|
||||
if(!BR || BR.damaged_brain)
|
||||
failed = "<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Patient's brain is missing or damaged beyond point of no return. Further attempts futile.</span>"
|
||||
if(BR)
|
||||
if(BR.damaged_brain)
|
||||
failed = "<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Patient's brain damaged beyond point of no return. Further attempts futile.</span>"
|
||||
if(BR.suicided || BR.brainmob?.suiciding)
|
||||
failed = "<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - No intelligence pattern can be detected in patient's brain. Further attempts futile.</span>"
|
||||
else
|
||||
failed = "<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Patient's brain is missing. Further attempts futile.</span>"
|
||||
|
||||
if(failed)
|
||||
user.visible_message(failed)
|
||||
|
||||
@@ -254,7 +254,7 @@
|
||||
to_chat(user, "<span class='warning'>The MMI indicates that their mind is currently inactive; it might change!</span>")
|
||||
return
|
||||
|
||||
if(BM.stat == DEAD || (M.brain && M.brain.damaged_brain))
|
||||
if(BM.stat == DEAD || BM.suiciding || (M.brain && (M.brain.damaged_brain || M.brain.suicided)))
|
||||
to_chat(user, "<span class='warning'>Sticking a dead brain into the frame would sort of defeat the purpose!</span>")
|
||||
return
|
||||
|
||||
|
||||
@@ -1,5 +1,29 @@
|
||||
/mob/var/suiciding = 0
|
||||
|
||||
/mob/proc/set_suicide(suicide_state)
|
||||
suiciding = suicide_state
|
||||
|
||||
/mob/living/carbon/set_suicide(suicide_state) //you thought that box trick was pretty clever, didn't you? well now hardmode is on, boyo.
|
||||
. = ..()
|
||||
var/obj/item/organ/brain/B = getorganslot(ORGAN_SLOT_BRAIN)
|
||||
if(B)
|
||||
B.suicided = suicide_state
|
||||
|
||||
/mob/living/silicon/robot/set_suicide(suicide_state)
|
||||
. = ..()
|
||||
if(mmi)
|
||||
if(mmi.brain)
|
||||
mmi.brain.suicided = suicide_state
|
||||
if(mmi.brainmob)
|
||||
mmi.brainmob.suiciding = suicide_state
|
||||
|
||||
/mob/living/carbon/human/virtual_reality/set_suicide(suicide_state)
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/virtual_reality/canSuicide()
|
||||
to_chat(src, "<span class='warning'>I'm sorry [first_name()], I'm afraid you can't do that.</span>")
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/verb/suicide()
|
||||
set hidden = 1
|
||||
if(!canSuicide())
|
||||
@@ -11,14 +35,14 @@
|
||||
if(!canSuicide())
|
||||
return
|
||||
if(confirm == "Yes")
|
||||
suiciding = TRUE
|
||||
set_suicide(TRUE)
|
||||
var/obj/item/held_item = get_active_held_item()
|
||||
if(held_item)
|
||||
var/damagetype = held_item.suicide_act(src)
|
||||
if(damagetype)
|
||||
if(damagetype & SHAME)
|
||||
adjustStaminaLoss(200)
|
||||
suiciding = FALSE
|
||||
set_suicide(FALSE)
|
||||
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "shameful_suicide", /datum/mood_event/shameful_suicide)
|
||||
return
|
||||
|
||||
@@ -78,7 +102,7 @@
|
||||
suicide_log()
|
||||
|
||||
adjustOxyLoss(max(200 - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0))
|
||||
death(0)
|
||||
death(FALSE)
|
||||
|
||||
/mob/living/brain/verb/suicide()
|
||||
set hidden = 1
|
||||
@@ -88,13 +112,13 @@
|
||||
if(!canSuicide())
|
||||
return
|
||||
if(confirm == "Yes")
|
||||
suiciding = 1
|
||||
set_suicide(TRUE)
|
||||
visible_message("<span class='danger'>[src]'s brain is growing dull and lifeless. [p_they(TRUE)] look[p_s()] like [p_theyve()] lost the will to live.</span>", \
|
||||
"<span class='userdanger'>[src]'s brain is growing dull and lifeless. [p_they(TRUE)] look[p_s()] like [p_theyve()] lost the will to live.</span>")
|
||||
|
||||
suicide_log()
|
||||
|
||||
death(0)
|
||||
death(FALSE)
|
||||
|
||||
/mob/living/carbon/monkey/verb/suicide()
|
||||
set hidden = 1
|
||||
@@ -104,14 +128,14 @@
|
||||
if(!canSuicide())
|
||||
return
|
||||
if(confirm == "Yes")
|
||||
suiciding = 1
|
||||
set_suicide(TRUE)
|
||||
visible_message("<span class='danger'>[src] is attempting to bite [p_their()] tongue. It looks like [p_theyre()] trying to commit suicide.</span>", \
|
||||
"<span class='userdanger'>[src] is attempting to bite [p_their()] tongue. It looks like [p_theyre()] trying to commit suicide.</span>")
|
||||
|
||||
suicide_log()
|
||||
|
||||
adjustOxyLoss(max(200- getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0))
|
||||
death(0)
|
||||
death(FALSE)
|
||||
|
||||
/mob/living/silicon/ai/verb/suicide()
|
||||
set hidden = 1
|
||||
@@ -121,7 +145,7 @@
|
||||
if(!canSuicide())
|
||||
return
|
||||
if(confirm == "Yes")
|
||||
suiciding = 1
|
||||
set_suicide(TRUE)
|
||||
visible_message("<span class='danger'>[src] is powering down. It looks like [p_theyre()] trying to commit suicide.</span>", \
|
||||
"<span class='userdanger'>[src] is powering down. It looks like [p_theyre()] trying to commit suicide.</span>")
|
||||
|
||||
@@ -129,7 +153,7 @@
|
||||
|
||||
//put em at -175
|
||||
adjustOxyLoss(max(maxHealth * 2 - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0))
|
||||
death(0)
|
||||
death(FALSE)
|
||||
|
||||
/mob/living/silicon/robot/verb/suicide()
|
||||
set hidden = 1
|
||||
@@ -139,7 +163,7 @@
|
||||
if(!canSuicide())
|
||||
return
|
||||
if(confirm == "Yes")
|
||||
suiciding = 1
|
||||
set_suicide(TRUE)
|
||||
visible_message("<span class='danger'>[src] is powering down. It looks like [p_theyre()] trying to commit suicide.</span>", \
|
||||
"<span class='userdanger'>[src] is powering down. It looks like [p_theyre()] trying to commit suicide.</span>")
|
||||
|
||||
@@ -147,7 +171,7 @@
|
||||
|
||||
//put em at -175
|
||||
adjustOxyLoss(max(maxHealth * 2 - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0))
|
||||
death(0)
|
||||
death(FALSE)
|
||||
|
||||
/mob/living/silicon/pai/verb/suicide()
|
||||
set hidden = 1
|
||||
@@ -159,7 +183,7 @@
|
||||
|
||||
suicide_log()
|
||||
|
||||
death(0)
|
||||
death(FALSE)
|
||||
else
|
||||
to_chat(src, "Aborting suicide attempt.")
|
||||
|
||||
@@ -171,7 +195,7 @@
|
||||
if(!canSuicide())
|
||||
return
|
||||
if(confirm == "Yes")
|
||||
suiciding = 1
|
||||
set_suicide(TRUE)
|
||||
visible_message("<span class='danger'>[src] is thrashing wildly! It looks like [p_theyre()] trying to commit suicide.</span>", \
|
||||
"<span class='userdanger'>[src] is thrashing wildly! It looks like [p_theyre()] trying to commit suicide.</span>", \
|
||||
"<span class='italics'>You hear thrashing.</span>")
|
||||
@@ -180,7 +204,7 @@
|
||||
|
||||
//put em at -175
|
||||
adjustOxyLoss(max(200 - getFireLoss() - getBruteLoss() - getOxyLoss(), 0))
|
||||
death(0)
|
||||
death(FALSE)
|
||||
|
||||
/mob/living/simple_animal/verb/suicide()
|
||||
set hidden = 1
|
||||
@@ -190,13 +214,13 @@
|
||||
if(!canSuicide())
|
||||
return
|
||||
if(confirm == "Yes")
|
||||
suiciding = 1
|
||||
set_suicide(TRUE)
|
||||
visible_message("<span class='danger'>[src] begins to fall down. It looks like [p_theyve()] lost the will to live.</span>", \
|
||||
"<span class='userdanger'>[src] begins to fall down. It looks like [p_theyve()] lost the will to live.</span>")
|
||||
|
||||
suicide_log()
|
||||
|
||||
death(0)
|
||||
death(FALSE)
|
||||
|
||||
/mob/living/proc/suicide_log()
|
||||
log_game("[key_name(src)] committed suicide at [AREACOORD(src)] as [src.type].")
|
||||
|
||||
@@ -90,7 +90,7 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
|
||||
|
||||
mind = body.mind //we don't transfer the mind but we keep a reference to it.
|
||||
|
||||
suiciding = body.suiciding // Transfer whether they committed suicide.
|
||||
set_suicide(body.suiciding) // Transfer whether they committed suicide.
|
||||
|
||||
if(ishuman(body))
|
||||
var/mob/living/carbon/human/body_human = body
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
newbrain.brainmob = null
|
||||
brainmob.forceMove(src)
|
||||
brainmob.container = src
|
||||
if(!newbrain.damaged_brain) // the brain organ hasn't been beaten to death.
|
||||
if(!newbrain.damaged_brain && !newbrain.suicided && !brainmob.suiciding) // the brain organ hasn't been beaten to death, nor was from a suicider.
|
||||
brainmob.stat = CONSCIOUS //we manually revive the brain mob
|
||||
GLOB.dead_mob_list -= brainmob
|
||||
GLOB.alive_mob_list += brainmob
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
slot = ORGAN_SLOT_BRAIN
|
||||
vital = TRUE
|
||||
attack_verb = list("attacked", "slapped", "whacked")
|
||||
var/suicided = FALSE
|
||||
var/mob/living/brain/brainmob = null
|
||||
var/damaged_brain = FALSE //whether the brain organ is damaged.
|
||||
var/decoy_override = FALSE //I apologize to the security players, and myself, who abused this, but this is going to go.
|
||||
@@ -70,6 +71,7 @@
|
||||
brainmob.name = L.real_name
|
||||
brainmob.real_name = L.real_name
|
||||
brainmob.timeofhostdeath = L.timeofdeath
|
||||
brainmob.suiciding = suicided
|
||||
if(L.has_dna())
|
||||
var/mob/living/carbon/C = L
|
||||
if(!brainmob.stored_dna)
|
||||
@@ -92,7 +94,9 @@
|
||||
/obj/item/organ/brain/examine(mob/user)
|
||||
..()
|
||||
|
||||
if(brainmob)
|
||||
if(suicided)
|
||||
to_chat(user, "It's started turning slightly grey. They must not have been able to handle the stress of it all.")
|
||||
else if(brainmob)
|
||||
if(brainmob.client)
|
||||
if(brainmob.health <= HEALTH_THRESHOLD_DEAD)
|
||||
to_chat(user, "It's lifeless and severely damaged.")
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
else if(istype(loc, /obj/item/organ/brain))
|
||||
BR = loc
|
||||
if(BR)
|
||||
BR.damaged_brain = 1 //beaten to a pulp
|
||||
BR.damaged_brain = TRUE //beaten to a pulp
|
||||
|
||||
/mob/living/brain/proc/handle_emp_damage()
|
||||
if(emp_damage)
|
||||
|
||||
@@ -436,7 +436,7 @@
|
||||
if(stat == DEAD && can_be_revived()) //in some cases you can't revive (e.g. no brain)
|
||||
GLOB.dead_mob_list -= src
|
||||
GLOB.alive_mob_list += src
|
||||
suiciding = 0
|
||||
set_suicide(FALSE)
|
||||
stat = UNCONSCIOUS //the mob starts unconscious,
|
||||
blind_eyes(1)
|
||||
updatehealth() //then we check if the mob should wake up.
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
O.dna.struc_enzymes = R.set_se(O.dna.struc_enzymes, on=1)//we don't want to keep the race block inactive
|
||||
|
||||
if(suiciding)
|
||||
O.suiciding = suiciding
|
||||
O.set_suicide(suiciding)
|
||||
if(hellbound)
|
||||
O.hellbound = hellbound
|
||||
O.a_intent = INTENT_HARM
|
||||
@@ -211,7 +211,7 @@
|
||||
O.domutcheck()
|
||||
|
||||
if(suiciding)
|
||||
O.suiciding = suiciding
|
||||
O.set_suicide(suiciding)
|
||||
if(hellbound)
|
||||
O.hellbound = hellbound
|
||||
|
||||
|
||||
@@ -219,12 +219,12 @@
|
||||
return FALSE
|
||||
if((world.time - C.timeofdeath) > 1800) //too late
|
||||
return FALSE
|
||||
if((C.getBruteLoss() > 180) || (C.getFireLoss() > 180) || !C.can_be_revived()) //too damaged
|
||||
if((C.getBruteLoss() >= MAX_REVIVE_BRUTE_DAMAGE) || (C.getFireLoss() >= MAX_REVIVE_FIRE_DAMAGE) || !C.can_be_revived()) //too damaged
|
||||
return FALSE
|
||||
if(!C.getorgan(/obj/item/organ/heart)) //what are we even shocking
|
||||
return FALSE
|
||||
var/obj/item/organ/brain/BR = C.getorgan(/obj/item/organ/brain)
|
||||
if(QDELETED(BR) || BR.damaged_brain)
|
||||
if(QDELETED(BR) || BR.damaged_brain || BR.suicided)
|
||||
return FALSE
|
||||
if(C.get_ghost())
|
||||
return FALSE
|
||||
|
||||
Reference in New Issue
Block a user