From 3ea8723188bb595de0591bd4e6dd9813e4e842ac Mon Sep 17 00:00:00 2001
From: Rhials <28870487+Rhials@users.noreply.github.com>
Date: Thu, 4 Jul 2024 17:46:43 -0400
Subject: [PATCH] [NO GBP] Silent events will now announce themselves to admins
before rolling (#84567)
## About The Pull Request
Events with alert_observers set to false will now announce themselves to
administrators before rolling, allowing for them to be cancelled or
rerolled.
## Why It's Good For The Game
This enables administrators to reroll minor events into bigger ones, but
more importantly, won't lead to rerolls leading to a silent event that
can no longer be rerolled.
It's one message run, at the absolute minimum, about every two and a
half minutes. I can testify that it is not a huge text obstruction for
admins or anything. It still doesn't show up to observers, only admins.
## Changelog
:cl: Rhials
admin: Quiet-announce random events still announce to admins and can
therefore be rerolled.
/:cl:
---
code/modules/events/_event.dm | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/code/modules/events/_event.dm b/code/modules/events/_event.dm
index 358057e1de0..0a41f5ffb6c 100644
--- a/code/modules/events/_event.dm
+++ b/code/modules/events/_event.dm
@@ -22,7 +22,7 @@
var/holidayID = "" //string which should be in the SSeventss.holidays list if you wish this event to be holiday-specific
//anything with a (non-null) holidayID which does not match holiday, cannot run.
var/wizardevent = FALSE
- var/alert_observers = TRUE //should we let the ghosts and admins know this event is firing
+ var/alert_observers = TRUE //should we let the ghosts know this event is firing
//should be disabled on events that fire a lot
/// Minimum wizard rituals at which to trigger this event, inclusive
@@ -101,15 +101,14 @@
triggering = TRUE
- // We sleep HERE, in pre-event setup (because there's no sense doing it in run_event() since the event is already running!) for the given amount of time to make an admin has enough time to cancel an event un-fitting of the present round.
- if(alert_observers)
- message_admins("Random Event triggering in [DisplayTimeText(RANDOM_EVENT_ADMIN_INTERVENTION_TIME)]: [name]. (CANCEL) (SOMETHING ELSE)")
- sleep(RANDOM_EVENT_ADMIN_INTERVENTION_TIME)
- var/players_amt = get_active_player_count(alive_check = TRUE, afk_check = TRUE, human_check = TRUE)
- if(!can_spawn_event(players_amt))
- message_admins("Second pre-condition check for [name] failed, rerolling...")
- SSevents.spawnEvent(excluded_event = src)
- return EVENT_INTERRUPTED
+ // We sleep HERE, in pre-event setup (because there's no sense doing it in run_event() since the event is already running!) for the given amount of time to make an admin has enough time to cancel an event un-fitting of the present round or at least reroll it.
+ message_admins("Random Event triggering in [DisplayTimeText(RANDOM_EVENT_ADMIN_INTERVENTION_TIME)]: [name]. (CANCEL) (SOMETHING ELSE)")
+ sleep(RANDOM_EVENT_ADMIN_INTERVENTION_TIME)
+ var/players_amt = get_active_player_count(alive_check = TRUE, afk_check = TRUE, human_check = TRUE)
+ if(!can_spawn_event(players_amt))
+ message_admins("Second pre-condition check for [name] failed, rerolling...")
+ SSevents.spawnEvent(excluded_event = src)
+ return EVENT_INTERRUPTED
if(!triggering)
return EVENT_CANCELLED //admin cancelled