[DataField("endTime", customTypeSerializer: typeof(TimeOffsetSerializer))]
[AutoPausedField]
public TimeSpan? EndTime;
+
+ /// <summary>
+ /// If false, the event won't trigger during ongoing evacuation.
+ /// </summary>
+ [DataField]
+ public bool OccursDuringRoundEnd = true;
}
using System.Linq;
using Content.Server.Chat.Managers;
using Content.Server.GameTicking;
+using Content.Server.RoundEnd;
using Content.Server.StationEvents.Components;
using Content.Shared.CCVar;
using Robust.Server.Player;
[Dependency] private readonly IPrototypeManager _prototype = default!;
[Dependency] private readonly IChatManager _chat = default!;
[Dependency] public readonly GameTicker GameTicker = default!;
+ [Dependency] private readonly RoundEndSystem _roundEnd = default!;
public bool EventsEnabled { get; private set; }
private void SetEnabled(bool value) => EventsEnabled = value;
return false;
}
+ if (_roundEnd.IsRoundEndRequested() && !stationEvent.OccursDuringRoundEnd)
+ {
+ return false;
+ }
+
return true;
}
}
startAudio:
path: /Audio/Announcements/intercept.ogg
duration: null # the rule has to last the whole round not 1 second
+ occursDuringRoundEnd: false
- type: AlertLevelInterceptionRule
- type: AntagSelection
definitions: