Makes the medibeam process only on active use (#83062)

## About The Pull Request

Per title

## Why It's Good For The Game

We can have things process only when they need to process

## Changelog
This commit is contained in:
The Sharkening
2024-05-07 03:19:27 +00:00
committed by SkyratBot
parent 654d27a396
commit 44c10b670d
@@ -16,12 +16,7 @@
weapon_weight = WEAPON_MEDIUM
/obj/item/gun/medbeam/Initialize(mapload)
. = ..()
START_PROCESSING(SSobj, src)
/obj/item/gun/medbeam/Destroy(mob/user)
STOP_PROCESSING(SSobj, src)
LoseTarget()
return ..()
@@ -41,6 +36,7 @@
QDEL_NULL(current_beam)
active = FALSE
on_beam_release(current_target)
STOP_PROCESSING(SSobj, src)
current_target = null
/**
@@ -69,6 +65,7 @@
active = TRUE
current_beam = user.Beam(current_target, icon_state="medbeam", time = 10 MINUTES, maxdistance = max_range, beam_type = /obj/effect/ebeam/medical)
RegisterSignal(current_beam, COMSIG_QDELETING, PROC_REF(beam_died))//this is a WAY better rangecheck than what was done before (process check)
START_PROCESSING(SSobj, src)
SSblackbox.record_feedback("tally", "gun_fired", 1, type)