diff --git a/code/modules/borer/borer.dm b/code/modules/borer/borer.dm index cca19c96b364..79e84ec97359 100644 --- a/code/modules/borer/borer.dm +++ b/code/modules/borer/borer.dm @@ -278,8 +278,15 @@ GLOBAL_DATUM_INIT(brainlink, /datum/borer_brainlink, new) if(host_mob) set_light_on(FALSE) heal_amt = 3 - if(!stat && host_mob.stat != DEAD) - var/mob/living/carbon/human/human_host + var/mob/living/carbon/human/human_host + var/dead_host = FALSE + if(host_mob.stat == DEAD) + if(ishuman(host_mob)) + human_host = host_mob + if(isxeno(host_mob) || (host_mob.status_flags & PERMANENTLY_DEAD) || human_host && human_host.undefibbable) + dead_host = TRUE + + if(!stat && !dead_host) if(ishuman(host_mob)) human_host = host_mob if((human_host.chem_effect_flags & CHEM_EFFECT_ANTI_PARASITE) && (!human_host.reagents.has_reagent("borerenzyme") || human_host.reagents.has_reagent("borercure"))) diff --git a/code/modules/borer/borer_procs.dm b/code/modules/borer/borer_procs.dm index 628a276f3476..4f9b5beb2959 100644 --- a/code/modules/borer/borer_procs.dm +++ b/code/modules/borer/borer_procs.dm @@ -224,7 +224,13 @@ return FALSE if(isxeno(target) && !(borer_flags_targets & BORER_TARGET_XENOS))//Can it infect xenos? Normally, no. return FALSE - if(target.stat != DEAD && Adjacent(target) && !target.has_brain_worms()) + if(target.stat == DEAD) + var/mob/living/carbon/human/human_target + if(ishuman(target)) + human_target = target + if(isxeno(target) || (target.status_flags & PERMANENTLY_DEAD) || human_target && human_target.undefibbable) + return FALSE + if(Adjacent(target) && !target.has_brain_worms()) return TRUE else return FALSE @@ -265,8 +271,12 @@ to_chat(src, SPAN_XENOWARNING("You cannot infest a target in your current state.")) return FALSE if(target.stat == DEAD) - to_chat(src, SPAN_WARNING("You cannot infest the dead.")) - return FALSE + var/mob/living/carbon/human/human_target + if(ishuman(target)) + human_target = target + if(isxeno(target) || (target.status_flags & PERMANENTLY_DEAD) || human_target && human_target.undefibbable) + to_chat(src, SPAN_WARNING("You cannot infest the dead.")) + return FALSE if(target in view(1, src)) to_chat(src, SPAN_NOTICE("You wiggle into [target]'s ear.")) if(!stealthy && !target.stat) diff --git a/code/modules/borer/borer_wip.dm b/code/modules/borer/borer_wip.dm index 67421ed34f86..cb0358ed406f 100644 --- a/code/modules/borer/borer_wip.dm +++ b/code/modules/borer/borer_wip.dm @@ -22,8 +22,12 @@ if(!target || !host_mob.Adjacent(target)) return FALSE if(target.stat == DEAD) - to_chat(host_mob, SPAN_WARNING("You cannot infest the dead.")) - return FALSE + var/mob/living/carbon/human/human_target + if(ishuman(target)) + human_target = target + if(isxeno(target) || (target.status_flags & PERMANENTLY_DEAD) || human_target && human_target.undefibbable) + to_chat(host_mob, SPAN_WARNING("You cannot infest the dead.")) + return FALSE if(target.has_brain_worms()) to_chat(host_mob, SPAN_WARNING("You cannot infest someone who is already infested!")) return FALSE