diff --git a/code/modules/mob/living/carbon/human/death_vr.dm b/code/modules/mob/living/carbon/human/death_vr.dm index b8b0e2d638..78a2c4ea48 100644 --- a/code/modules/mob/living/carbon/human/death_vr.dm +++ b/code/modules/mob/living/carbon/human/death_vr.dm @@ -9,3 +9,22 @@ deadnif.wear(10) //Presumably it's gone through some shit if they got gibbed? . = ..() + +//Surprisingly this is only called for humans, but whatever! +/hook/death/proc/digestion_check(var/mob/living/carbon/human/H, var/gibbed) + //Not in a belly? Well, too bad! + if(!isbelly(H.loc)) + return TRUE + + //What belly! + var/obj/belly/B = H.loc + + //Were they digesting and we have a mind you can update? + //Technically allows metagaming by allowing buddies to turn on digestion for like 2 seconds + // to finish off critically wounded friends to avoid resleeving sickness, but like + // *kill those people* ok? + if(B.digest_mode == DM_DIGEST) + H.mind?.vore_death = TRUE + + //Hooks need to return true otherwise they're considered having failed + return TRUE diff --git a/code/modules/resleeving/machines.dm b/code/modules/resleeving/machines.dm index b98c64efe6..e6e6dc580f 100644 --- a/code/modules/resleeving/machines.dm +++ b/code/modules/resleeving/machines.dm @@ -584,11 +584,17 @@ occupant.confused = max(occupant.confused, confuse_amount) // Apply immedeate effects occupant.eye_blurry = max(occupant.eye_blurry, blur_amount) - if(!(occupant.mind.vore_death)) - occupant.add_modifier(/datum/modifier/faux_resleeving_sickness, sickness_duration/3) // And more longterm, though purely visual ones + + // Vore deaths get a fake modifier labeled as such + if(!occupant.mind) + log_debug("[occupant] didn't have a mind to check for vore_death, which may be problematic.") + + if(occupant.mind?.vore_death) + occupant.add_modifier(/datum/modifier/faux_resleeving_sickness, sickness_duration) + occupant.mind.vore_death = FALSE + // Normal ones get a normal modifier to nerf charging into combat else - occupant.add_modifier(/datum/modifier/resleeving_sickness, sickness_duration) // Much more serious if it wasn't a death by vore though - occupant.mind.vore_death = FALSE // Reset our death type. Just in case + occupant.add_modifier(/datum/modifier/resleeving_sickness, sickness_duration) if(occupant.mind && occupant.original_player && ckey(occupant.mind.key) != occupant.original_player) log_and_message_admins("is now a cross-sleeved character. Body originally belonged to [occupant.real_name]. Mind is now [occupant.mind.name].",occupant) diff --git a/code/modules/resleeving/resleeving_sickness.dm b/code/modules/resleeving/resleeving_sickness.dm index 39a3b25b5d..d0fef60a9f 100644 --- a/code/modules/resleeving/resleeving_sickness.dm +++ b/code/modules/resleeving/resleeving_sickness.dm @@ -16,8 +16,8 @@ accuracy_dispersion = 20 // 20% less precise. /datum/modifier/faux_resleeving_sickness - name = "resleeving sickness" - desc = "You feel somewhat weak and unfocused, having been sleeved not so long ago." + name = "resleeving sickness (vore)" + desc = "You feel somewhat weak and unfocused, having been sleeved not so long ago. (OOC: No real penalty for vore-related deaths)" stacks = MODIFIER_STACK_EXTEND on_created_text = "You feel slightly weak and unfocused." @@ -37,12 +37,11 @@ return TRUE /datum/modifier/gory_devourment/on_applied() - if(holder.ckey) - if(holder.mind) - cached_mind = holder.mind - return + 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 + cached_mind?.vore_death = TRUE + cached_mind = null //Don't keep a hardref + return ..() \ No newline at end of file diff --git a/code/modules/vore/eating/belly_obj_vr.dm b/code/modules/vore/eating/belly_obj_vr.dm index b3472de774..a6221a4a57 100644 --- a/code/modules/vore/eating/belly_obj_vr.dm +++ b/code/modules/vore/eating/belly_obj_vr.dm @@ -390,11 +390,7 @@ // Default implementation calls M.death() and removes from internal contents. // Indigestable items are removed, and M is deleted. /obj/belly/proc/digestion_death(var/mob/living/M) - //M.death(1) // "Stop it he's already dead..." Basically redundant and the reason behind screaming mouse carcasses. - if(M.ckey) - message_admins("[key_name(owner)] has digested [key_name(M)] in their [lowertext(name)] ([owner ? "JMP" : "null"])") - if(M.mind) - M.mind.vore_death = TRUE + message_admins("[key_name(owner)] has digested [key_name(M)] in their [lowertext(name)] ([owner ? "JMP" : "null"])") // If digested prey is also a pred... anyone inside their bellies gets moved up. if(is_vore_predator(M))