mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
slight adjustment to MouseDrop (#13169)
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user