From 1dc853710c408c84c43e02d1e709b5033aefacbe Mon Sep 17 00:00:00 2001 From: mwerezak Date: Wed, 12 Aug 2015 23:38:44 -0400 Subject: [PATCH] Implant items do not count for continuing to process embedded objects Also makes embedded pain messages respect NO_PAIN. --- code/modules/mob/living/carbon/human/human.dm | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 9421123ae5..43a4fd8914 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1032,8 +1032,9 @@ /mob/living/carbon/human/embedded_needs_process() for(var/obj/item/organ/external/organ in src.organs) - if(organ.implants.len) - return 1 + for(var/obj/item/O in organ.implants) + if(!istype(O, /obj/item/weapon/implant)) //implant type items do not cause embedding effects, see handle_embedded_objects() + return 1 return 0 /mob/living/carbon/human/proc/handle_embedded_objects() @@ -1041,18 +1042,17 @@ for(var/obj/item/organ/external/organ in src.organs) if(organ.status & ORGAN_SPLINTED) //Splints prevent movement. continue - for(var/obj/item/weapon/O in organ.implants) + for(var/obj/item/O in organ.implants) if(!istype(O,/obj/item/weapon/implant) && prob(5)) //Moving with things stuck in you could be bad. // All kinds of embedded objects cause bleeding. - var/msg = null - switch(rand(1,3)) - if(1) - msg ="A spike of pain jolts your [organ.name] as you bump [O] inside." - if(2) - msg ="Your movement jostles [O] in your [organ.name] painfully." - if(3) - msg ="[O] in your [organ.name] twists painfully as you move." - src << msg + if(species.flags & NO_PAIN) + src << "You feel [O] moving inside your [organ.name]." + else + var/msg = pick( \ + "A spike of pain jolts your [organ.name] as you bump [O] inside.", \ + "Your movement jostles [O] in your [organ.name] painfully.", \ + "Your movement jostles [O] in your [organ.name] painfully.") + src << msg organ.take_damage(rand(1,3), 0, 0) if(!(organ.status & ORGAN_ROBOT) && !(species.flags & NO_BLOOD)) //There is no blood in protheses.