From 52c4960db48780226ac681b3857977f6ba1a6f00 Mon Sep 17 00:00:00 2001 From: NovaBot <154629622+NovaBot13@users.noreply.github.com> Date: Sat, 23 Mar 2024 14:38:31 -0400 Subject: [PATCH] [MIRROR] Fix; pet carrier unfriending pets put in it. (#1594) * Fix; pet carrier unfriending pets put in it. (#82165) ## About The Pull Request Checks while "attacking" a corgi if the attacker is holding a pet_carrier and is not aggressive. ## Why It's Good For The Game Closes https://github.com/tgstation/tgstation/issues/82156 ## Changelog :cl: fix: pet carrier unfriending pets put in it. /:cl: --------- Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> * Fix; pet carrier unfriending pets put in it. --------- Co-authored-by: Bilbo367 <163439532+Bilbo367@users.noreply.github.com> Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> --- code/game/objects/items/pet_carrier.dm | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/code/game/objects/items/pet_carrier.dm b/code/game/objects/items/pet_carrier.dm index 6a5d1280a60..f4d27d82de8 100644 --- a/code/game/objects/items/pet_carrier.dm +++ b/code/game/objects/items/pet_carrier.dm @@ -77,12 +77,13 @@ playsound(user, 'sound/machines/boltsup.ogg', 30, TRUE) update_appearance() -/obj/item/pet_carrier/attack(mob/living/target, mob/living/user) - if(user.combat_mode) - return ..() +/obj/item/pet_carrier/interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers) + if(user.combat_mode || !isliving(interacting_with)) + return NONE if(!open) to_chat(user, span_warning("You need to open [src]'s door!")) - return + return ITEM_INTERACT_BLOCKING + var/mob/living/target = interacting_with if(target.mob_size > max_occupant_weight) if(ishuman(target)) var/mob/living/carbon/human/H = target @@ -92,11 +93,12 @@ to_chat(user, span_warning("Humans, generally, do not fit into pet carriers.")) else to_chat(user, span_warning("You get the feeling [target] isn't meant for a [name].")) - return + return ITEM_INTERACT_BLOCKING if(user == target) to_chat(user, span_warning("Why would you ever do that?")) - return + return ITEM_INTERACT_BLOCKING load_occupant(user, target) + return ITEM_INTERACT_SUCCESS /obj/item/pet_carrier/relaymove(mob/living/user, direction) if(open)