mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 13:10:02 +01:00
[MIRROR] Skeletons can treat their bone wounds again, improves door crush dislocation fix (#626)
* Skeletons can treat their bone wounds again, improves door crush dislocation fix (#53307) * Skeletons can treat their bone wounds again, improves door crush dislocation fix Co-authored-by: Ryll Ryll <3589655+Ryll-Ryll@users.noreply.github.com>
This commit is contained in:
@@ -533,12 +533,16 @@
|
||||
/mob/living/carbon/human/proc/canUseHUD()
|
||||
return (mobility_flags & MOBILITY_USE)
|
||||
|
||||
/mob/living/carbon/human/can_inject(mob/user, error_msg, target_zone, penetrate_thick = 0)
|
||||
. = 1 // Default to returning true.
|
||||
/mob/living/carbon/human/can_inject(mob/user, error_msg, target_zone, penetrate_thick = FALSE, ignore_species = FALSE)
|
||||
. = TRUE // Default to returning true.
|
||||
if(user && !target_zone)
|
||||
target_zone = user.zone_selected
|
||||
if(HAS_TRAIT(src, TRAIT_PIERCEIMMUNE))
|
||||
. = 0
|
||||
// we may choose to ignore species trait pierce immunity in case we still want to check skellies for thick clothing without insta failing them (wounds)
|
||||
if(ignore_species)
|
||||
if(HAS_TRAIT_NOT_FROM(src, TRAIT_PIERCEIMMUNE, SPECIES_TRAIT))
|
||||
. = FALSE
|
||||
else if(HAS_TRAIT(src, TRAIT_PIERCEIMMUNE))
|
||||
. = FALSE
|
||||
// If targeting the head, see if the head item is thin enough.
|
||||
// If targeting anything else, see if the wear suit is thin enough.
|
||||
if (!penetrate_thick)
|
||||
@@ -546,12 +550,12 @@
|
||||
if(head && istype(head, /obj/item/clothing))
|
||||
var/obj/item/clothing/CH = head
|
||||
if (CH.clothing_flags & THICKMATERIAL)
|
||||
. = 0
|
||||
. = FALSE
|
||||
else
|
||||
if(wear_suit && istype(wear_suit, /obj/item/clothing))
|
||||
var/obj/item/clothing/CS = wear_suit
|
||||
if (CS.clothing_flags & THICKMATERIAL)
|
||||
. = 0
|
||||
. = FALSE
|
||||
if(!. && error_msg && user)
|
||||
// Might need re-wording.
|
||||
to_chat(user, "<span class='alert'>There is no exposed flesh or thin material [above_neck(target_zone) ? "on [p_their()] head" : "on [p_their()] body"].</span>")
|
||||
|
||||
Reference in New Issue
Block a user