Merge pull request #8104 from Ghommie/Ghommie-cit9
Chemical Patches fix.
This commit is contained in:
@@ -495,11 +495,11 @@
|
||||
/mob/living/carbon/human/proc/canUseHUD()
|
||||
return !(src.stat || IsKnockdown() || IsStun() || src.restrained())
|
||||
|
||||
/mob/living/carbon/human/can_inject(mob/user, error_msg, target_zone, var/penetrate_thick = 0)
|
||||
/mob/living/carbon/human/can_inject(mob/user, error_msg, target_zone, penetrate_thick = FALSE, bypass_immunity = FALSE)
|
||||
. = 1 // Default to returning true.
|
||||
if(user && !target_zone)
|
||||
target_zone = user.zone_selected
|
||||
if(has_trait(TRAIT_PIERCEIMMUNE))
|
||||
if(has_trait(TRAIT_PIERCEIMMUNE) && !bypass_immunity)
|
||||
. = 0
|
||||
// If targeting the head, see if the head item is thin enough.
|
||||
// If targeting anything else, see if the wear suit is thin enough.
|
||||
|
||||
@@ -14,11 +14,11 @@
|
||||
/obj/item/reagent_containers/pill/patch/attack(mob/living/L, mob/user)
|
||||
if(ishuman(L))
|
||||
var/obj/item/bodypart/affecting = L.get_bodypart(check_zone(user.zone_selected))
|
||||
if(!L.can_inject(user, 1, affecting)) //like monkey code, thickmaterial stops patches
|
||||
return
|
||||
if(!affecting)
|
||||
to_chat(user, "<span class='warning'>The limb is missing!</span>")
|
||||
return
|
||||
if(!L.can_inject(user, TRUE, user.zone_selected, FALSE, TRUE)) //stopped by clothing, not by species immunity.
|
||||
return
|
||||
if(affecting.status != BODYPART_ORGANIC)
|
||||
to_chat(user, "<span class='notice'>Medicine won't work on a robotic limb!</span>")
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user