From 28f7414c64b2d640c4ac1995b63c40f40880217a Mon Sep 17 00:00:00 2001 From: Toastical <20125180+Toastical@users.noreply.github.com> Date: Tue, 21 Oct 2025 22:15:54 +0300 Subject: [PATCH] fix RPD interactions with storage and UI elements (#30629) --- code/game/objects/items/rpd.dm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/code/game/objects/items/rpd.dm b/code/game/objects/items/rpd.dm index 85e24bf46d7..6fa9ec09824 100644 --- a/code/game/objects/items/rpd.dm +++ b/code/game/objects/items/rpd.dm @@ -315,11 +315,11 @@ else return //Either nothing was selected, or an invalid mode was selected to_chat(user, "You set [src]'s mode.") - + /obj/item/rpd/ranged_interact_with_atom(atom/target, mob/living/user, list/modifiers) if(!ranged) return NONE - + if(handle_atom_interaction(target, user, ranged)) return ITEM_INTERACT_COMPLETE @@ -332,10 +332,7 @@ return NONE /obj/item/rpd/proc/handle_atom_interaction(atom/target, mob/living/user, ranged) - if(isstorage(target)) - var/obj/item/storage/S = target - if(!S.can_be_inserted(src, stop_messages = TRUE)) - return ITEM_INTERACT_COMPLETE + if(isstorage(target) || ismodcontrol(target)) return NONE if(world.time < lastused + spawndelay) @@ -350,6 +347,9 @@ return ITEM_INTERACT_COMPLETE if(target != T) + if(target.loc != T) // Avoids placing pipes when clicking onto something that's inside something. Like clicking on your PDA on UI. + return ITEM_INTERACT_COMPLETE + // We only check the rpd_act of the target if it isn't the turf, because otherwise // (A) blocked turfs can be acted on, and (B) unblocked turfs get acted on twice. if(target.rpd_act(user, src))