mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-21 12:05:28 +01:00
Reflexive biting can't bite through helmets (#18307)
* Reflexive biting can't bite through helmets Prevents reflexive biting from biting through headwear. * Forgot is_muzzled is a proc Also, can check on other mobs, just returns false always for non-humans atm I think
This commit is contained in:
@@ -526,8 +526,20 @@
|
||||
span_notice("[target] moves to avoid being touched by you!"), )
|
||||
return
|
||||
|
||||
var/covered_mouth = FALSE
|
||||
if((target.touch_reaction_flags & SPECIES_TRAIT_PATTING_DEFENCE) && ishuman(target)) // No need to test this for now if they don't have the trait
|
||||
var/mob/living/carbon/human/M = target
|
||||
if(M.head)
|
||||
if((M.head.body_parts_covered & FACE) || (M.head.flags_inv & HIDEFACE)) // Need to check both because a lot of items set one or the other, rather than both as you'd expect
|
||||
covered_mouth = TRUE
|
||||
if(M.wear_mask)
|
||||
if((M.wear_mask.body_parts_covered & FACE) || (M.wear_mask.flags_inv & HIDEFACE))
|
||||
covered_mouth = TRUE
|
||||
if(target.is_muzzled())
|
||||
covered_mouth = TRUE
|
||||
|
||||
if(H.zone_sel.selecting == BP_HEAD)
|
||||
if(target.touch_reaction_flags & SPECIES_TRAIT_PATTING_DEFENCE)
|
||||
if((target.touch_reaction_flags & SPECIES_TRAIT_PATTING_DEFENCE) && !covered_mouth)
|
||||
H.visible_message( \
|
||||
span_warning("[target] reflexively bites the hand of [H] to prevent head patting!"), \
|
||||
span_warning("[target] reflexively bites your hand!"), )
|
||||
@@ -544,7 +556,7 @@
|
||||
span_notice("[H] shakes [target]'s hand."), \
|
||||
span_notice("You shake [target]'s hand."), )
|
||||
else if(H.zone_sel.selecting == "mouth")
|
||||
if(target.touch_reaction_flags & SPECIES_TRAIT_PATTING_DEFENCE)
|
||||
if((target.touch_reaction_flags & SPECIES_TRAIT_PATTING_DEFENCE) && !covered_mouth)
|
||||
H.visible_message( \
|
||||
span_warning("[target] reflexively bites the hand of [H] to prevent nose booping!"), \
|
||||
span_warning("[target] reflexively bites your hand!"), )
|
||||
|
||||
Reference in New Issue
Block a user