[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
🆑 Rhials
admin: Quiet-announce random events still announce to admins and can
therefore be rerolled.
/🆑
This commit is contained in:
Rhials
2024-07-04 17:46:43 -04:00
committed by GitHub
parent a6d5803a03
commit 3ea8723188
+9 -10
View File
@@ -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]. (<a href='?src=[REF(src)];cancel=1'>CANCEL</a>) (<a href='?src=[REF(src)];different_event=1'>SOMETHING ELSE</a>)")
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]. (<a href='?src=[REF(src)];cancel=1'>CANCEL</a>) (<a href='?src=[REF(src)];different_event=1'>SOMETHING ELSE</a>)")
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