slight adjustment to MouseDrop (#13169)

This commit is contained in:
Intigracy
2016-12-30 11:07:24 -08:00
committed by ComicIronic
parent 7752a789fb
commit 4e77f7955e

View File

@@ -6,15 +6,20 @@
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
if(!can_MouseDrop(over))
return FALSE
spawn(0)
over.MouseDrop_T(src,usr)
return
return TRUE
// recieve a mousedrop
/atom/proc/MouseDrop_T(atom/dropping, mob/user)
return
/atom/proc/can_MouseDrop(atom/otheratom, mob/user = usr)
if(!user || !otheratom)
return FALSE
if(!Adjacent(user) || !otheratom.Adjacent(user))
return FALSE
return TRUE