mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-27 06:54:18 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user