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
+1 -9
View File
@@ -26,6 +26,7 @@
stored_blade = new /obj/item/hatchet/cutterblade(src)
register_context()
update_appearance()
AddElement(/datum/element/drag_pickup)
/obj/item/papercutter/Destroy(force)
if(!isnull(stored_paper))
@@ -180,15 +181,6 @@
new /obj/item/paper/paperslip(get_turf(src))
update_appearance()
/obj/item/papercutter/mouse_drop_dragged(atom/over_object, mob/user)
if(over_object == user)
user.put_in_hands(src)
else if(istype(over_object, /atom/movable/screen/inventory/hand))
var/atom/movable/screen/inventory/hand/target_hand = over_object
user.putItemFromInventoryInHandIfPossible(src, target_hand.held_index)
add_fingerprint(user)
/obj/item/paper/paperslip
name = "paper slip"
desc = "A little slip of paper left over after a larger piece was cut. Whoa."