mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-20 11:31:12 +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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user