Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GBP no update] Fixes Possible Firealarm spam #18143

Merged
merged 2 commits into from
Jul 1, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions code/game/machinery/firealarm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -227,13 +229,18 @@ FIRE ALARM
if(user.incapacitated())
return 1

if(fingerprintslast == user.ckey && world.time < last_time_pulled + 2 SECONDS) //no spamming >:C
to_chat(user, "<span class='warning'>[src] is still processing your earlier command.</span>")
return

toggle_alarm(user)


/obj/machinery/firealarm/proc/toggle_alarm(mob/user)
var/area/A = get_area(src)
if(istype(A))
add_fingerprint(user)
last_time_pulled = world.time
if(A.fire)
reset()
else
Expand Down