Skip to content

Commit

Permalink
[MIRROR] Stops cluster grenades from spamming admins (#1537)
Browse files Browse the repository at this point in the history
* Stops cluster grenades from spamming admins (#82090)

## About The Pull Request

Stops cluster grenades from logging their children.

## Why It's Good For The Game

Helps out with tgstation/tgstation#81865.

## Changelog

:cl:
admin: cluster bombs stop spamming admin logs
/:cl:

* Stops cluster grenades from spamming admins

---------

Co-authored-by: Bilbo367 <[email protected]>
  • Loading branch information
2 people authored and StealsThePRs committed Mar 20, 2024
1 parent 8c02f0d commit 0a1380c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
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

0 comments on commit 0a1380c

Please sign in to comment.