mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-09 16:05:07 +00:00
## About The Pull Request
Port of my changes from [Monkestation/Monkestation2.0@`c54fc87`
(#7295)](c54fc872bf)
This nukes `/obj/item/bodypart/proc/get_modified_bleed_rate()`, instead
everything just uses the `cache_bleed_rate` var - `refresh_bleed_rate()`
will now take into account body position and grasping in the same way
`get_modified_bleed_rate` did.
(Un)grasping a limb already called `refresh_bleed_rate()` anyways, so
the only other change needed was making
`COMSIG_LIVING_SET_BODY_POSITION` also call it.
38 lines
1.2 KiB
Plaintext
38 lines
1.2 KiB
Plaintext
/mob/living/carbon/add_context(atom/source, list/context, obj/item/held_item, mob/user)
|
|
. = ..()
|
|
|
|
if (!isnull(held_item))
|
|
context[SCREENTIP_CONTEXT_CTRL_SHIFT_LMB] = "Offer item"
|
|
return CONTEXTUAL_SCREENTIP_SET
|
|
|
|
if (!ishuman(user))
|
|
return .
|
|
|
|
var/mob/living/carbon/human/human_user = user
|
|
|
|
if (human_user.combat_mode)
|
|
context[SCREENTIP_CONTEXT_LMB] = "Attack"
|
|
else if (human_user == src)
|
|
context[SCREENTIP_CONTEXT_LMB] = "Check injuries"
|
|
|
|
if (get_bodypart(human_user.zone_selected)?.cached_bleed_rate)
|
|
context[SCREENTIP_CONTEXT_CTRL_LMB] = "Grab limb"
|
|
|
|
if (human_user != src)
|
|
context[SCREENTIP_CONTEXT_RMB] = "Shove"
|
|
|
|
if (!human_user.combat_mode)
|
|
if (body_position == STANDING_UP)
|
|
if(check_zone(user.zone_selected) == BODY_ZONE_HEAD && get_bodypart(BODY_ZONE_HEAD))
|
|
context[SCREENTIP_CONTEXT_LMB] = "Headpat"
|
|
else if(user.zone_selected == BODY_ZONE_PRECISE_GROIN && !isnull(get_organ_by_type(/obj/item/organ/tail)))
|
|
context[SCREENTIP_CONTEXT_LMB] = "Pull tail"
|
|
else
|
|
context[SCREENTIP_CONTEXT_LMB] = "Hug"
|
|
else if (health >= 0 && !HAS_TRAIT(src, TRAIT_FAKEDEATH))
|
|
context[SCREENTIP_CONTEXT_LMB] = "Shake"
|
|
else
|
|
context[SCREENTIP_CONTEXT_LMB] = "CPR"
|
|
|
|
return CONTEXTUAL_SCREENTIP_SET
|