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 18:17:23 -04:00
committed by GitHub
co-authored by ArcaneMusic Xander3359
parent 4bdce87fee
commit da10322dc1
16 changed files with 73 additions and 130 deletions
+1
View File
@@ -322,6 +322,7 @@
#include "trauma_granting.dm"
#include "turf_icons.dm"
#include "tutorial_sanity.dm"
#include "unequip_defib.dm"
#include "unit_test.dm"
#include "verify_config_tags.dm"
#include "verify_emoji_names.dm"
+19
View File
@@ -0,0 +1,19 @@
/// Test you can mouse-drop a defib off your back to unequip it
/datum/unit_test/unequip_defib
/datum/unit_test/unequip_defib/Run()
var/mob/living/carbon/human/consistent/dummy = EASY_ALLOCATE()
dummy.mock_client = new()
dummy.set_hud_used(new dummy.hud_type(dummy))
var/obj/item/defibrillator/defib = EASY_ALLOCATE()
dummy.equip_to_slot(defib, ITEM_SLOT_BACK)
var/old_usr = usr
usr = dummy // mouse drop still uses usr
defib.MouseDrop(dummy.hud_used.hand_slots["1"])
if(!dummy.is_holding(defib))
TEST_FAIL("The dummy failed to remove the defib from their back via mouse drop.")
usr = old_usr