mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-26 17:41:05 +00:00
19 lines
839 B
Plaintext
19 lines
839 B
Plaintext
/datum/component/storage/concrete/wallet/on_alt_click(datum/source, mob/user)
|
|
if(!isliving(user) || !user.CanReach(parent) || user.incapacitated())
|
|
return
|
|
if(locked)
|
|
to_chat(user, "<span class='warning'>[parent] seems to be locked!</span>")
|
|
return
|
|
|
|
var/obj/item/storage/wallet/A = parent
|
|
if(istype(A) && A.front_id && !issilicon(user) && !(A.item_flags & IN_STORAGE)) //if it's a wallet in storage seeing the full inventory is more useful
|
|
var/obj/item/I = A.front_id
|
|
A.add_fingerprint(user)
|
|
remove_from_storage(I, get_turf(user))
|
|
if(!user.put_in_hands(I))
|
|
to_chat(user, "<span class='notice'>You fumble for [I] and it falls on the floor.</span>")
|
|
return
|
|
user.visible_message("<span class='warning'>[user] draws [I] from [parent]!</span>", "<span class='notice'>You draw [I] from [parent].</span>")
|
|
return
|
|
..()
|