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
@@ -323,13 +323,13 @@
return TRUE
return ..()
/obj/item/modular_computer/MouseDrop(atom/over_object)
var/mob/M = usr
/obj/item/modular_computer/mouse_drop_dragged(atom/over, mob/user, src_location, over_location, params)
var/mob/M = user
if(use_check_and_message(M))
return
if(istype(over_object, /obj/machinery/power/apc) && tesla_link)
return over_object.attackby(src, M)
if(!istype(over_object, /atom/movable/screen) && !(over_object == src))
if(istype(over, /obj/machinery/power/apc) && tesla_link)
return over.attackby(src, M)
if(!istype(over, /atom/movable/screen) && !(over == src))
return attack_self(M)
/obj/item/modular_computer/GetID()