mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-24 17:22:23 +00:00
* Add ability to swap items in storage Add ability to swap items in storage through drag and drop Fix "the the" message when putting item in storage Clean code where possible * Fix swap in stacked storages, clean up code (v3) * Ignore restraints and lying for swapping items * Clean up the code a bit, increase readability * Clean up code, remove spawn(0) * Fix some spacing issues * Rename var, use crisp font
20 lines
569 B
Plaintext
20 lines
569 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(!(istype(over, /obj/screen) || (loc && loc == over.loc)))
|
|
if(!Adjacent(usr) || !over.Adjacent(usr)) // should stop you from dragging through windows
|
|
return
|
|
|
|
INVOKE_ASYNC(over, .proc/MouseDrop_T, src, usr)
|
|
|
|
// recieve a mousedrop
|
|
/atom/proc/MouseDrop_T(atom/dropping, mob/user)
|
|
return
|