diff --git a/Content.Server/StationEvents/BasicStationEventSchedulerSystem.cs b/Content.Server/StationEvents/BasicStationEventSchedulerSystem.cs index 36d30f50eee..0243a00c9a7 100644 --- a/Content.Server/StationEvents/BasicStationEventSchedulerSystem.cs +++ b/Content.Server/StationEvents/BasicStationEventSchedulerSystem.cs @@ -4,7 +4,9 @@ using Content.Server.GameTicking.Rules.Components; using Content.Server.StationEvents.Components; using Content.Shared.Administration; +using Content.Shared.CCVar; using JetBrains.Annotations; +using Robust.Shared.Configuration; using Robust.Shared.Random; using Robust.Shared.Toolshed; using Robust.Shared.Utility; @@ -20,6 +22,7 @@ public sealed class BasicStationEventSchedulerSystem : GameRuleSystem private void ResetTimer(BasicStationEventSchedulerComponent component) { - // 5 - 25 minutes. TG does 3-10 but that's pretty frequent - component.TimeUntilNextEvent = _random.Next(300, 1500); + component.TimeUntilNextEvent = _random.Next(_config.GetCVar(CCVars.GameEventsBasicMinimumTime), + _config.GetCVar(CCVars.GameEventsBasicMaximumTime)); } } diff --git a/Content.Server/StationEvents/RampingStationEventSchedulerSystem.cs b/Content.Server/StationEvents/RampingStationEventSchedulerSystem.cs index ef3b5cf18a7..53a98e8b762 100644 --- a/Content.Server/StationEvents/RampingStationEventSchedulerSystem.cs +++ b/Content.Server/StationEvents/RampingStationEventSchedulerSystem.cs @@ -70,7 +70,7 @@ private void PickNextEventTime(EntityUid uid, RampingStationEventSchedulerCompon { var mod = GetChaosModifier(uid, component); - // 4-12 minutes baseline. Will get faster over time as the chaos mod increases. - component.TimeUntilNextEvent = _random.NextFloat(240f / mod, 720f / mod); + component.TimeUntilNextEvent = _random.NextFloat(_cfg.GetCVar(CCVars.GameEventsRampingMinimumTime) / mod, + _cfg.GetCVar(CCVars.GameEventsRampingMaximumTime)) / mod; } } diff --git a/Content.Shared/CCVar/CCVars.cs b/Content.Shared/CCVar/CCVars.cs index ab36977efbd..7d7f3c70449 100644 --- a/Content.Shared/CCVar/CCVars.cs +++ b/Content.Shared/CCVar/CCVars.cs @@ -112,14 +112,14 @@ public static readonly CVarDef /// Close to how long you expect a round to last, so you'll probably have to tweak this on downstreams. /// public static readonly CVarDef - EventsRampingAverageEndTime = CVarDef.Create("events.ramping_average_end_time", 40f, CVar.ARCHIVE | CVar.SERVERONLY); + EventsRampingAverageEndTime = CVarDef.Create("events.ramping_average_end_time", 120f, CVar.ARCHIVE | CVar.SERVERONLY); /// /// Average ending chaos modifier for the ramping event scheduler. /// Max chaos chosen for a round will deviate from this /// public static readonly CVarDef - EventsRampingAverageChaos = CVarDef.Create("events.ramping_average_chaos", 6f, CVar.ARCHIVE | CVar.SERVERONLY); + EventsRampingAverageChaos = CVarDef.Create("events.ramping_average_chaos", 4f, CVar.ARCHIVE | CVar.SERVERONLY); /* * Game @@ -173,6 +173,33 @@ public static readonly CVarDef public static readonly CVarDef GameLobbyEnableWin = CVarDef.Create("game.enablewin", true, CVar.ARCHIVE); + /// + /// Minimum time between Basic station events in seconds + /// + public static readonly CVarDef // 15 Minutes + GameEventsBasicMinimumTime = CVarDef.Create("game.events_basic_minimum_time", 900, CVar.SERVERONLY); + + /// + /// Maximum time between Basic station events in seconds + /// + public static readonly CVarDef // 35 Minutes + GameEventsBasicMaximumTime = CVarDef.Create("game.events_basic_maximum_time", 2100, CVar.SERVERONLY); + + /// + /// Minimum time between Ramping station events in seconds + /// + public static readonly CVarDef // 20 Minutes + GameEventsRampingMinimumTime = CVarDef.Create("game.events_ramping_minimum_time", 1200, CVar.SERVERONLY); + + /// + /// Maximum time between Ramping station events in seconds + /// + public static readonly CVarDef // 45 Minutes + GameEventsRampingMaximumTime = CVarDef.Create("game.events_ramping_maximum_time", 2700, CVar.SERVERONLY); + + /// + /// + /// /// Controls the maximum number of character slots a player is allowed to have. ///