Merge pull request #6577 from Citadel-Station-13/upstream-merge-36839

[MIRROR] Deactivate suicide prescans via ghost var
This commit is contained in:
deathride58
2018-05-02 14:25:32 +00:00
committed by GitHub
3 changed files with 48 additions and 4 deletions
+38 -2
View File
@@ -12,8 +12,6 @@
return
if(confirm == "Yes")
suiciding = TRUE
log_game("[key_name(src)] (job: [job ? "[job]" : "None"]) committed suicide at [get_area(src)].")
message_admins("[key_name(src)] (job: [job ? "[job]" : "None"]) committed suicide at [get_area(src)].")
var/obj/item/held_item = get_active_held_item()
if(held_item)
var/damagetype = held_item.suicide_act(src)
@@ -23,6 +21,9 @@
suiciding = FALSE
SendSignal(COMSIG_ADD_MOOD_EVENT, "shameful_suicide", /datum/mood_event/shameful_suicide)
return
suicide_log()
var/damage_mod = 0
for(var/T in list(BRUTELOSS, FIRELOSS, TOXLOSS, OXYLOSS))
damage_mod += (T & damagetype) ? 1 : 0
@@ -49,6 +50,7 @@
adjustOxyLoss(max(200 - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0))
death(FALSE)
return
var/suicide_message
@@ -73,6 +75,8 @@
visible_message("<span class='danger'>[suicide_message]</span>", "<span class='userdanger'>[suicide_message]</span>")
suicide_log()
adjustOxyLoss(max(200 - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0))
death(0)
@@ -87,6 +91,9 @@
suiciding = 1
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)
/mob/living/carbon/monkey/verb/suicide()
@@ -100,6 +107,9 @@
suiciding = 1
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)
@@ -114,6 +124,9 @@
suiciding = 1
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>")
suicide_log()
//put em at -175
adjustOxyLoss(max(maxHealth * 2 - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0))
death(0)
@@ -129,6 +142,9 @@
suiciding = 1
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>")
suicide_log()
//put em at -175
adjustOxyLoss(max(maxHealth * 2 - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0))
death(0)
@@ -140,6 +156,9 @@
var/turf/T = get_turf(src.loc)
T.visible_message("<span class='notice'>[src] flashes a message across its screen, \"Wiping core files. Please acquire a new personality to continue using pAI device functions.\"</span>", null, \
"<span class='notice'>[src] bleeps electronically.</span>")
suicide_log()
death(0)
else
to_chat(src, "Aborting suicide attempt.")
@@ -156,6 +175,9 @@
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>")
suicide_log()
//put em at -175
adjustOxyLoss(max(200 - getFireLoss() - getBruteLoss() - getOxyLoss(), 0))
death(0)
@@ -171,8 +193,22 @@
suiciding = 1
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)
/mob/living/proc/suicide_log()
var/turf/T = get_turf(src)
log_game("[key_name(src)] committed suicide at [get_area(src)][COORD(T)] as [src.type].")
message_admins("[key_name(src)] committed suicide at [get_area(src)] as [src.type].")
/mob/living/carbon/human/suicide_log()
var/turf/T = get_turf(src)
log_game("[key_name(src)] (job: [src.job ? "[src.job]" : "None"]) committed suicide at [get_area(src)][COORD(T)].")
message_admins("[key_name(src)] (job: [job ? "[job]" : "None"]) committed suicide at [get_area(src)].")
/mob/living/proc/canSuicide()
if(stat == CONSCIOUS)
@@ -91,6 +91,9 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
name = random_unique_name(gender)
mind = body.mind //we don't transfer the mind but we keep a reference to it.
suiciding = body.suiciding // Transfer whether they committed suicide.
if(ishuman(body))
var/mob/living/carbon/human/body_human = body
if(HAIR in body_human.dna.species.species_traits)