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

[MIRROR] Stops cluster grenades from spamming admins #2485

Merged
merged 1 commit into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
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
5 changes: 4 additions & 1 deletion code/game/objects/items/grenades/_grenade.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
var/dud_flags = NONE
///Is this grenade currently armed?
var/active = FALSE
///Is it a cluster grenade? We dont wanna spam admin logs with these.
var/type_cluster = FALSE
///How long it takes for a grenade to explode after being armed
var/det_time = 5 SECONDS
///Will this state what it's det_time is when examined?
Expand Down Expand Up @@ -135,7 +137,8 @@
arm_grenade(user)

/obj/item/grenade/proc/log_grenade(mob/user)
log_bomber(user, "has primed a", src, "for detonation", message_admins = !dud_flags)
if(!type_cluster)
log_bomber(user, "has primed a", src, "for detonation", message_admins = dud_flags != NONE)

/**
* arm_grenade (formerly preprime) refers to when a grenade with a standard time fuze is activated, making it go beepbeepbeep and then detonate a few seconds later.
Expand Down
1 change: 1 addition & 0 deletions code/game/objects/items/grenades/clusterbuster.dm
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
var/obj/item/grenade/grenade = new type(loc)
if(istype(grenade))
grenade.active = TRUE
grenade.type_cluster = TRUE
addtimer(CALLBACK(grenade, TYPE_PROC_REF(/obj/item/grenade, detonate)), rand(RANDOM_DETONATE_MIN_TIME, RANDOM_DETONATE_MAX_TIME))
var/steps = rand(1, 4)
for(var/step in 1 to steps)
Expand Down
Loading