Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes checking a person's inventory requiring a do_after and causing a buckle notification. #56153

Merged
merged 2 commits into from Jan 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
30 changes: 15 additions & 15 deletions code/modules/mob/living/carbon/human/human.dm
Expand Up @@ -1029,25 +1029,25 @@
message_admins(msg)
admin_ticket_log(src, msg)


/mob/living/carbon/human/MouseDrop_T(mob/living/target, mob/living/user)
if(pulling != target || grab_state != GRAB_AGGRESSIVE || stat != CONSCIOUS || a_intent != INTENT_GRAB)
return ..()

//If they dragged themselves and we're currently aggressively grabbing them try to piggyback
if(user == target)
if(can_piggyback(target))
piggyback(target)
//If you dragged them to you and you're aggressively grabbing try to fireman carry them
else if(can_be_firemanned(target))
fireman_carry(target)

/mob/living/carbon/human/limb_attack_self()
var/obj/item/bodypart/arm = hand_bodyparts[active_hand_index]
if(arm)
arm.attack_self(src)
return ..()

/mob/living/carbon/human/mouse_buckle_handling(mob/living/M, mob/living/user)
if(pulling != M || grab_state != GRAB_AGGRESSIVE || stat != CONSCIOUS || a_intent != INTENT_GRAB)
return FALSE

//If they dragged themselves to you and you're currently aggressively grabbing them try to piggyback
if(user == M && can_piggyback(M))
piggyback(M)
return TRUE

//If you dragged them to you and you're aggressively grabbing try to fireman carry them
if(can_be_firemanned(M))
fireman_carry(M)
return TRUE

//src is the user that will be carrying, target is the mob to be carried
/mob/living/carbon/human/proc/can_piggyback(mob/living/carbon/target)
Expand Down Expand Up @@ -1090,7 +1090,7 @@
density = old_density

if(target.loc == loc)
buckle_mob(target, TRUE, TRUE, CARRIER_NEEDS_ARM)
return buckle_mob(target, TRUE, TRUE, CARRIER_NEEDS_ARM)

/mob/living/carbon/human/proc/piggyback(mob/living/carbon/target)
if(!can_piggyback(target))
Expand All @@ -1106,7 +1106,7 @@
target.visible_message("<span class='warning'>[target] can't hang onto [src]!</span>")
return

buckle_mob(target, TRUE, TRUE, RIDER_NEEDS_ARMS)
return buckle_mob(target, TRUE, TRUE, RIDER_NEEDS_ARMS)

/mob/living/carbon/human/buckle_mob(mob/living/target, force = FALSE, check_loc = TRUE, buckle_mob_flags= NONE)
if(!is_type_in_typecache(target, can_ride_typecache))
Expand Down
6 changes: 6 additions & 0 deletions code/modules/mob/mob.dm
Expand Up @@ -817,6 +817,12 @@
*/
/mob/MouseDrop_T(atom/dropping, atom/user)
. = ..()

// Our mouse drop has already been handled by something else. Most likely buckling code.
// Since it has already been handled, we don't need to show inventory.
if(.)
return

if(ismob(dropping) && src == user && dropping != user)
var/mob/M = dropping
var/mob/U = user
Expand Down