Mouse drop refactor (#20256)

Refactored mousedrag procs, added signals, some safeguards, did some
cleanups around, renamed them to make a little more sense. Mostly put in
line with TG's code.
Fast clicking and releasing with a drag, depending on the grace period
and how fast it is done, can be counted as clicks, to aid in combat
scenarios where you spamclick.
This commit is contained in:
Fluffy
2024-12-26 14:26:32 +00:00
committed by GitHub
parent a904e1d435
commit df014f9bc0
108 changed files with 860 additions and 485 deletions
+2 -2
View File
@@ -166,8 +166,8 @@
return
return
/obj/structure/m_tray/MouseDrop_T(atom/dropping, mob/user)
var/atom/movable/O = dropping
/obj/structure/m_tray/mouse_drop_receive(atom/dropped, mob/user, params)
var/atom/movable/O = dropped
if(!istype(O, /atom/movable) || O.anchored || get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src) || user.contents.Find(O))
return
if(!ismob(O) && !istype(O, /obj/structure/closet/body_bag))