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
+5 -3
View File
@@ -246,8 +246,11 @@
// mouse drop another mob or self
//
/obj/machinery/disposal/MouseDrop_T(atom/dropping, mob/user)
var/mob/target = dropping
/obj/machinery/disposal/mouse_drop_receive(atom/dropped, mob/user, params)
var/mob/target = dropped
if(!istype(target))
return
if(user.stat || !user.canmove || !istype(target))
return
if(target.buckled_to || get_dist(user, src) > 1 || get_dist(user, target) > 1)
@@ -304,7 +307,6 @@
C.show_message(msg, 3)
update()
return
/obj/machinery/disposal/proc/check_mob_size(mob/target)
return 1