From 26bd51946564ad7fd5f711c93c3f5f09cf7854dd Mon Sep 17 00:00:00 2001 From: Kugamo Date: Fri, 1 Jul 2022 17:20:42 -0500 Subject: [PATCH] [GBP no update] Fixes Possible Firealarm spam (#18143) * Yep * SteelSlayer Suggestion Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com> Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com> --- code/game/machinery/firealarm.dm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/code/game/machinery/firealarm.dm b/code/game/machinery/firealarm.dm index 0e9191bcfbc0..3769521130aa 100644 --- a/code/game/machinery/firealarm.dm +++ b/code/game/machinery/firealarm.dm @@ -36,6 +36,8 @@ FIRE ALARM var/report_fire_alarms = TRUE // Should triggered fire alarms also trigger an actual alarm? var/show_alert_level = TRUE // Should fire alarms display the current alert level? + var/last_time_pulled //used to prevent pulling spam by same persons + /obj/machinery/firealarm/no_alarm report_fire_alarms = FALSE @@ -227,6 +229,10 @@ FIRE ALARM if(user.incapacitated()) return 1 + if(fingerprintslast == user.ckey && world.time < last_time_pulled + 2 SECONDS) //no spamming >:C + to_chat(user, "[src] is still processing your earlier command.") + return + toggle_alarm(user) @@ -234,6 +240,7 @@ FIRE ALARM var/area/A = get_area(src) if(istype(A)) add_fingerprint(user) + last_time_pulled = world.time if(A.fire) reset() else