mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +01:00
puts the drag_pickup component on card decks (#59857)
This commit is contained in:
@@ -711,6 +711,7 @@
|
||||
|
||||
/obj/item/toy/cards/deck/Initialize()
|
||||
. = ..()
|
||||
AddElement(/datum/element/drag_pickup)
|
||||
populate_deck()
|
||||
|
||||
///Generates all the cards within the deck.
|
||||
@@ -799,24 +800,6 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/toy/cards/deck/MouseDrop(atom/over_object)
|
||||
. = ..()
|
||||
var/mob/living/M = usr
|
||||
if(!istype(M) || !(M.mobility_flags & MOBILITY_PICKUP))
|
||||
return
|
||||
if(Adjacent(usr))
|
||||
if(over_object == M && loc != M)
|
||||
M.put_in_hands(src)
|
||||
to_chat(usr, span_notice("You pick up the deck."))
|
||||
|
||||
else if(istype(over_object, /atom/movable/screen/inventory/hand))
|
||||
var/atom/movable/screen/inventory/hand/H = over_object
|
||||
if(M.putItemFromInventoryInHandIfPossible(src, H.held_index))
|
||||
to_chat(usr, span_notice("You pick up the deck."))
|
||||
|
||||
else
|
||||
to_chat(usr, span_warning("You can't reach it from here!"))
|
||||
|
||||
|
||||
|
||||
/obj/item/toy/cards/cardhand
|
||||
|
||||
Reference in New Issue
Block a user