Made prox sensor cooldown apply before pulse effect (#73447)

This prevents it pulsing multiple times before the next activation time
is reached

---------

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
This commit is contained in:
oranges
2023-02-17 12:44:02 +13:00
committed by GitHub
parent f588b2cd0e
commit 439a04ef97
+2 -1
View File
@@ -90,11 +90,12 @@
/obj/item/assembly/prox_sensor/proc/sense()
if(!scanning || !secured || next_activate > world.time)
return FALSE
next_activate = world.time + (3 SECONDS) // this must happen before anything else
pulse()
audible_message("<span class='infoplain'>[icon2html(src, hearers(src))] *beep* *beep* *beep*</span>", null, hearing_range)
for(var/mob/hearing_mob in get_hearers_in_view(hearing_range, src))
hearing_mob.playsound_local(get_turf(src), 'sound/machines/triple_beep.ogg', ASSEMBLY_BEEP_VOLUME, TRUE)
next_activate = world.time + 30
return TRUE
/obj/item/assembly/prox_sensor/process(delta_time)