Combat mode component. (#12338)

* Combat mode component.

* Whoops.

* test.

* Oh

* refs begone, and documentation.
This commit is contained in:
Ghom
2020-05-27 18:00:32 -07:00
committed by GitHub
parent 93a168d8a8
commit 968426fd48
38 changed files with 325 additions and 296 deletions
@@ -77,7 +77,6 @@
var/static/image/drained_overlay = image(icon = 'icons/obj/guns/energy.dmi', icon_state = "esniper_empty")
var/datum/action/item_action/zoom_lock_action/zoom_lock_action
var/mob/listeningTo
/obj/item/gun/energy/beam_rifle/debug
delay = 0
@@ -178,7 +177,6 @@
STOP_PROCESSING(SSfastprocess, src)
set_user(null)
QDEL_LIST(current_tracers)
listeningTo = null
return ..()
/obj/item/gun/energy/beam_rifle/proc/aiming_beam(force_update = FALSE)
@@ -260,17 +258,12 @@
if(user == current_user)
return
stop_aiming(current_user)
if(listeningTo)
UnregisterSignal(listeningTo, COMSIG_MOVABLE_MOVED)
listeningTo = null
if(istype(current_user))
LAZYREMOVE(current_user.mousemove_intercept_objects, src)
if(current_user)
UnregisterSignal(current_user, COMSIG_MOVABLE_MOVED)
current_user = null
if(istype(user))
current_user = user
LAZYOR(current_user.mousemove_intercept_objects, src)
RegisterSignal(user, COMSIG_MOVABLE_MOVED, .proc/on_mob_move)
listeningTo = user
/obj/item/gun/energy/beam_rifle/onMouseDrag(src_object, over_object, src_location, over_location, params, mob)
if(aiming)