mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 02:16:05 +00:00
20 lines
626 B
Plaintext
20 lines
626 B
Plaintext
/*
|
|
MouseDrop:
|
|
|
|
Called on the atom you're dragging. In a lot of circumstances we want to use the
|
|
recieving object instead, so that's the default action. This allows you to drag
|
|
almost anything into a trash can.
|
|
*/
|
|
/atom/MouseDrop(atom/over)
|
|
if(!usr || !over) return
|
|
if(!Adjacent(usr) || !over.Adjacent(usr)) return // should stop you from dragging through windows
|
|
|
|
spawn(0)
|
|
over.MouseDrop_T(src,usr)
|
|
return
|
|
|
|
// recieve a mousedrop
|
|
/atom/proc/MouseDrop_T(atom/dropping, mob/user)
|
|
writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/atom/proc/MouseDrop_T() called tick#: [world.time]")
|
|
return
|