mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 21:48:39 +01:00
[MIRROR] Fixes offering things to yourself [MDB IGNORE] (#12295)
* Fixes offering things to yourself * Fixes the conflicts related to carbon_defense.dm Co-authored-by: cacogen <25089914+cacogen@users.noreply.github.com> Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
This commit is contained in:
co-authored by
cacogen
GoldenAlpharex
parent
04171e6017
commit
d320615c8b
@@ -22,7 +22,14 @@
|
||||
context[SCREENTIP_CONTEXT_RMB] = "Shove"
|
||||
|
||||
if (body_position == STANDING_UP)
|
||||
context[SCREENTIP_CONTEXT_LMB] = "Comfort"
|
||||
if(check_zone(user.zone_selected) == BODY_ZONE_HEAD && get_bodypart(BODY_ZONE_HEAD))
|
||||
context[SCREENTIP_CONTEXT_LMB] = "Headpat"
|
||||
/* SKYRAT REMOVAL START - No taill pulling
|
||||
else if(check_zone(user.zone_selected) == BODY_ZONE_PRECISE_GROIN && !isnull(getorgan(/obj/item/organ/tail)))
|
||||
context[SCREENTIP_CONTEXT_LMB] = "Pull tail"
|
||||
*/ // SKYRAT REMOVAL END
|
||||
else
|
||||
context[SCREENTIP_CONTEXT_LMB] = "Hug"
|
||||
else if (health >= 0 && !HAS_TRAIT(src, TRAIT_FAKEDEATH))
|
||||
context[SCREENTIP_CONTEXT_LMB] = "Shake"
|
||||
else
|
||||
|
||||
@@ -482,7 +482,7 @@
|
||||
"<span class='notice'>You boop [src] on the nose.</span>")
|
||||
//SKYRAT EDIT ADDITION END
|
||||
|
||||
else if(check_zone(M.zone_selected) == BODY_ZONE_HEAD) //Headpats!
|
||||
else if(check_zone(M.zone_selected) == BODY_ZONE_HEAD && get_bodypart(BODY_ZONE_HEAD)) //Headpats!
|
||||
//SKYRAT EDIT ADDITION
|
||||
if(HAS_TRAIT(src, TRAIT_OVERSIZED) && !HAS_TRAIT(M, TRAIT_OVERSIZED))
|
||||
visible_message(span_warning("[M] tries to pat [src] on the head, but can't reach!"))
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
*/
|
||||
/mob/living/carbon/proc/give(mob/living/carbon/offered)
|
||||
if(has_status_effect(/datum/status_effect/offering))
|
||||
to_chat(src, span_warning("You're already offering up something!"))
|
||||
to_chat(src, span_warning("You're already offering something!"))
|
||||
return
|
||||
|
||||
if(IS_DEAD_OR_INCAP(src))
|
||||
@@ -173,20 +173,31 @@
|
||||
|
||||
var/obj/item/offered_item = get_active_held_item()
|
||||
if(!offered_item)
|
||||
to_chat(src, span_warning("You're not holding anything to give!"))
|
||||
to_chat(src, span_warning("You're not holding anything to offer!"))
|
||||
return
|
||||
|
||||
if(offered)
|
||||
if(offered == src)
|
||||
if(!swap_hand(get_inactive_hand_index())) //have to swap hands first to take something
|
||||
to_chat(src, span_warning("You try to take [offered_item] from yourself, but fail."))
|
||||
return
|
||||
if(!put_in_active_hand(offered_item))
|
||||
to_chat(src, span_warning("You try to take [offered_item] from yourself, but fail."))
|
||||
return
|
||||
else
|
||||
to_chat(src, span_notice("You take [offered_item] from yourself."))
|
||||
return
|
||||
|
||||
if(IS_DEAD_OR_INCAP(offered))
|
||||
to_chat(src, span_warning("They're unable to take anything in their current state!"))
|
||||
to_chat(src, span_warning("[offered.p_theyre(TRUE)] unable to take anything in [offered.p_their()] current state!"))
|
||||
return
|
||||
|
||||
if(!CanReach(offered))
|
||||
to_chat(src, span_warning("You have to be adjacent to offer things!"))
|
||||
to_chat(src, span_warning("You have to be beside [offered.p_them()]!"))
|
||||
return
|
||||
else
|
||||
if(!(locate(/mob/living/carbon) in orange(1, src)))
|
||||
to_chat(src, span_warning("There's nobody adjacent to offer it to!"))
|
||||
to_chat(src, span_warning("There's nobody beside you to take it!"))
|
||||
return
|
||||
|
||||
if(offered_item.on_offered(src)) // see if the item interrupts with its own behavior
|
||||
|
||||
Reference in New Issue
Block a user