diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 369d43defd2..cbc1b434832 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1030,25 +1030,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) @@ -1091,7 +1091,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)) @@ -1107,7 +1107,7 @@ target.visible_message("[target] can't hang onto [src]!") 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)) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index fa933c1423d..835f9ee6457 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -819,6 +819,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