Skip to content

Commit

Permalink
Fix FalseAlarmRule (#587)
Browse files Browse the repository at this point in the history
# Description
Grrr, 3 lines changed. Filter out events that don't have a start
announcement.

# Changelog
:cl:
- fix: False alarm event will no longer report events that should not be
reported.
  • Loading branch information
Mnemotechnician authored Jul 24, 2024
1 parent 2ac6ec5 commit 527acd8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Content.Server/StationEvents/Events/FalseAlarmRule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ protected override void Started(EntityUid uid, FalseAlarmRuleComponent component
{
base.Started(uid, component, gameRule, args);

var allEv = _event.AllEvents().Select(p => p.Key).ToList();
var allEv = _event.AllEvents()
.Where(p => p.Value.StartAnnouncement)
.Select(p => p.Key).ToList();
var picked = RobustRandom.Pick(allEv);

_announcer.SendAnnouncement(
Expand Down

0 comments on commit 527acd8

Please sign in to comment.