Fix modsuits and defibs (#93373)

## About The Pull Request

Fixes #93359

Caused by #93165

Inventory screen elements were no longer considered reachable, which
broke mousedrop handing on objects that check "is dragging into
inventory slot"

I don't know the best way to fix this yet but I figured the next best
thing would be to make all of these use the `drag_pickup` element, which
skips this reach-ability check

Thus I refactored it slightly to accommodate for items which should
contextually not be drag-pick-up-abble and bam, works like a charm

## Changelog

🆑 Melbert
fix: Dragging defibs and modsuits off your back works again
/🆑

---------

Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com>
Co-authored-by: Xander3359 <66163761+Xander3359@users.noreply.github.com>
This commit is contained in:
MrMelbert
2025-10-11 17:17:23 -05:00
committed by GitHub
parent 4bdce87fee
commit da10322dc1
16 changed files with 73 additions and 130 deletions
+11 -7
View File
@@ -775,11 +775,15 @@ GLOBAL_LIST_EMPTY(cached_storage_typecaches)
SIGNAL_HANDLER
if(ismecha(user.loc) || user.incapacitated || !user.canUseStorage())
return
return NONE
if(istype(over_object, /atom/movable/screen/inventory/hand))
if(real_location.loc != user || !user.can_perform_action(parent, FORBID_TELEKINESIS_REACH | ALLOW_RESTING))
return
return NONE
if(isitem(parent))
var/obj/item/item_parent = parent
if(!item_parent.can_mob_unequip(user))
return COMPONENT_CANCEL_MOUSEDROP_ONTO
var/atom/movable/screen/inventory/hand/hand = over_object
user.putItemFromInventoryInHandIfPossible(parent, hand.held_index)
@@ -788,27 +792,27 @@ GLOBAL_LIST_EMPTY(cached_storage_typecaches)
if(ismob(over_object))
if(over_object != user || !user.can_perform_action(parent, FORBID_TELEKINESIS_REACH | ALLOW_RESTING))
return
return NONE
parent.add_fingerprint(user)
INVOKE_ASYNC(src, PROC_REF(open_storage), user)
return COMPONENT_CANCEL_MOUSEDROP_ONTO
if(istype(over_object, /atom/movable/screen))
return
return NONE
if(!user.can_perform_action(over_object, FORBID_TELEKINESIS_REACH))
return
return NONE
parent.add_fingerprint(user)
var/atom/dump_loc = over_object.get_dumping_location()
if(isnull(dump_loc))
return
return NONE
/// Don't dump *onto* objects in the same storage as ourselves
if (over_object.loc == parent.loc && !isnull(parent.loc.atom_storage) && isnull(over_object.atom_storage))
return
return NONE
INVOKE_ASYNC(src, PROC_REF(dump_content_at), over_object, dump_loc, user)
return COMPONENT_CANCEL_MOUSEDROP_ONTO