mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-12 08:36:00 +01:00
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:
@@ -106,6 +106,7 @@
|
||||
module = new module(src)
|
||||
install(module)
|
||||
START_PROCESSING(SSobj, src)
|
||||
AddElement(/datum/element/drag_pickup)
|
||||
|
||||
/obj/item/mod/control/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
@@ -212,14 +213,14 @@
|
||||
return
|
||||
clean_up()
|
||||
|
||||
/obj/item/mod/control/allow_attack_hand_drop(mob/user)
|
||||
/obj/item/mod/control/can_mob_unequip(mob/user)
|
||||
if(user != wearer)
|
||||
return ..()
|
||||
|
||||
if(active)
|
||||
balloon_alert(wearer, "unit active!")
|
||||
playsound(src, 'sound/machines/scanner/scanbuzz.ogg', 25, FALSE, SILENCED_SOUND_EXTRARANGE)
|
||||
return
|
||||
return FALSE
|
||||
|
||||
for(var/obj/item/part as anything in get_parts())
|
||||
if(part.loc != src)
|
||||
@@ -229,23 +230,6 @@
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/item/mod/control/mouse_drop_dragged(atom/over_object, mob/user)
|
||||
if(user != wearer || !istype(over_object, /atom/movable/screen/inventory/hand))
|
||||
return
|
||||
if(active)
|
||||
balloon_alert(wearer, "unit active!")
|
||||
playsound(src, 'sound/machines/scanner/scanbuzz.ogg', 25, FALSE, SILENCED_SOUND_EXTRARANGE)
|
||||
return
|
||||
for(var/obj/item/part as anything in get_parts())
|
||||
if(part.loc != src)
|
||||
balloon_alert(wearer, "parts extended!")
|
||||
playsound(src, 'sound/machines/scanner/scanbuzz.ogg', 25, FALSE, SILENCED_SOUND_EXTRARANGE)
|
||||
return
|
||||
if(!wearer.incapacitated)
|
||||
var/atom/movable/screen/inventory/hand/ui_hand = over_object
|
||||
if(wearer.putItemFromInventoryInHandIfPossible(src, ui_hand.held_index))
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/mod/control/wrench_act(mob/living/user, obj/item/wrench)
|
||||
if(seconds_electrified && get_charge() && shock(user))
|
||||
return ITEM_INTERACT_BLOCKING
|
||||
|
||||
Reference in New Issue
Block a user