Rework resleeving sickness for voredeaths

This commit is contained in:
Arokha Sieyes
2020-03-12 12:48:14 -04:00
parent b41c642dd9
commit e6f766d4c6
4 changed files with 37 additions and 17 deletions

View File

@@ -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

View File

@@ -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)

View File

@@ -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 = "<span class='warning'>You feel slightly weak and unfocused.</span>"
@@ -37,12 +37,11 @@
return TRUE
/datum/modifier/gory_devourment/on_applied()
if(holder.ckey)
if(holder.mind)
cached_mind = holder.mind
return
return ..()
/datum/modifier/gory_devourment/on_expire()
if(holder.stat == DEAD)
cached_mind.vore_death = TRUE
return
cached_mind?.vore_death = TRUE
cached_mind = null //Don't keep a hardref
return ..()

View File

@@ -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 ? "<a href='?_src_=holder;adminplayerobservecoodjump=1;X=[owner.x];Y=[owner.y];Z=[owner.z]'>JMP</a>" : "null"])")
if(M.mind)
M.mind.vore_death = TRUE
// If digested prey is also a pred... anyone inside their bellies gets moved up.
if(is_vore_predator(M))