From b09c8c5a38252409a34fcc0db0585f96af099885 Mon Sep 17 00:00:00 2001 From: Heroman Date: Fri, 14 Feb 2020 10:07:02 +1000 Subject: [PATCH] Prevents resleeving sickness from affecting hardvore victims --- .../station/station_special_abilities_vr.dm | 2 ++ .../modules/resleeving/resleeving_sickness.dm | 26 ++++++++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/species/station/station_special_abilities_vr.dm b/code/modules/mob/living/carbon/human/species/station/station_special_abilities_vr.dm index f66a4061d8..772d9881cf 100644 --- a/code/modules/mob/living/carbon/human/species/station/station_special_abilities_vr.dm +++ b/code/modules/mob/living/carbon/human/species/station/station_special_abilities_vr.dm @@ -745,6 +745,8 @@ to_chat(src,"Looks like you lost your chance...") return + T.add_modifier(/datum/modifier/gory_devourment, 10 SECONDS) + //Removing an internal organ if(T_int && T_int.damage >= 25) //Internal organ and it's been severely damaged T.apply_damage(15, BRUTE, T_ext) //Damage the external organ they're going through. diff --git a/code/modules/resleeving/resleeving_sickness.dm b/code/modules/resleeving/resleeving_sickness.dm index bdfcbb0e25..39a3b25b5d 100644 --- a/code/modules/resleeving/resleeving_sickness.dm +++ b/code/modules/resleeving/resleeving_sickness.dm @@ -21,4 +21,28 @@ stacks = MODIFIER_STACK_EXTEND on_created_text = "You feel slightly weak and unfocused." - on_expired_text = "You feel your strength and focus return to you." \ No newline at end of file + on_expired_text = "You feel your strength and focus return to you." + +/datum/modifier/gory_devourment + name = "gory devourment" + desc = "You are being devoured! Dying right now would definitely be same as dying as food." + stacks = MODIFIER_STACK_EXTEND + hidden = TRUE + var/datum/mind/cached_mind = null + +/datum/modifier/gory_devourment/can_apply(var/mob/living/L) + if(L.stat == DEAD) + return FALSE + else + return TRUE + +/datum/modifier/gory_devourment/on_applied() + if(holder.ckey) + if(holder.mind) + cached_mind = holder.mind + return + +/datum/modifier/gory_devourment/on_expire() + if(holder.stat == DEAD) + cached_mind.vore_death = TRUE + return \ No newline at end of file