Files
VOREStation/code/_onclick/drag_drop.dm
T
Cameron Lennox 5917c7bdee Completes the /datum/component/shadekin work (#17895)
* Makes shadekin a component

* Update shadekin.dm

* Update human.dm

* a

* i love typos

* Update life.dm

* guh

* Upports the shadekin stuff

Also fixes an 8 year bug where the ability master would delete itself

* boh

* flashlight flickering

* flickery

* Update flashlight.dm

* i hate lightcode

* no clue

* reenable

* more changes

* evil

* Update living.dm

* simplekin fix

* yeah

* maw fixes
2025-07-05 20:04:24 +02:00

30 lines
983 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/proc/CanMouseDrop(atom/over, var/mob/user = usr)
if(!user || !over)
return FALSE
if(user.incapacitated())
return FALSE
if(!src.Adjacent(user) || !over.Adjacent(user))
return FALSE // should stop you from dragging through windows
return TRUE
/atom/MouseDrop(atom/over, src_location, over_location, src_control, over_control, params)
if(!usr || !over)
return
if(!Adjacent(usr) || !over.Adjacent(usr))
return // should stop you from dragging through windows
if(is_incorporeal(usr))
return
INVOKE_ASYNC(over, TYPE_PROC_REF(/atom, MouseDrop_T), src, usr, src_location, over_location, src_control, over_control, params)
/atom/proc/MouseDrop_T(atom/dropping, mob/user, src_location, over_location, src_control, over_control, params)
return