diff --git a/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.cs b/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.cs index baa6d52194..573fa36a26 100644 --- a/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.cs +++ b/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.cs @@ -10,6 +10,8 @@ using Content.Shared.Xenoarchaeology.XenoArtifacts; using JetBrains.Annotations; using Robust.Shared.Random; using Robust.Shared.Timing; +using Robust.Shared.Configuration; +using Content.Shared.CCVar; namespace Content.Server.Xenoarchaeology.XenoArtifacts; @@ -18,6 +20,7 @@ public sealed partial class ArtifactSystem : EntitySystem [Dependency] private readonly IGameTiming _gameTiming = default!; [Dependency] private readonly IRobustRandom _random = default!; [Dependency] private readonly SharedAudioSystem _audio = default!; + [Dependency] private readonly IConfigurationManager _configurationManager = default!; private ISawmill _sawmill = default!; @@ -301,12 +304,16 @@ public sealed partial class ArtifactSystem : EntitySystem /// private void OnRoundEnd(RoundEndTextAppendEvent ev) { - var query = EntityQueryEnumerator(); - while (query.MoveNext(out var ent, out var artifactComp)) + var RoundEndTimer = _configurationManager.GetCVar(CCVars.ArtifactRoundEndTimer); + if (RoundEndTimer > 0) { - artifactComp.CooldownTime = TimeSpan.Zero; - var timerTrigger = EnsureComp(ent); - timerTrigger.ActivationRate = TimeSpan.FromSeconds(0.5); //HAHAHAHAHAHAHAHAHAH -emo + var query = EntityQueryEnumerator(); + while (query.MoveNext(out var ent, out var artifactComp)) + { + artifactComp.CooldownTime = TimeSpan.Zero; + var timerTrigger = EnsureComp(ent); + timerTrigger.ActivationRate = TimeSpan.FromSeconds(RoundEndTimer); //HAHAHAHAHAHAHAHAHAH -emo + } } } } diff --git a/Content.Shared/CCVar/CCVars.cs b/Content.Shared/CCVar/CCVars.cs index bfd2ac7053..90056bc8d1 100644 --- a/Content.Shared/CCVar/CCVars.cs +++ b/Content.Shared/CCVar/CCVars.cs @@ -306,6 +306,12 @@ namespace Content.Shared.CCVar public static readonly CVarDef GameAlertLevelChangeDelay = CVarDef.Create("game.alert_level_change_delay", 30, CVar.SERVERONLY); + /// + /// How many times per second artifacts when the round is over. + /// If set to 0, they won't activate (on a timer) when the round ends. + /// + public static readonly CVarDef ArtifactRoundEndTimer = CVarDef.Create("game.artifact_round_end_timer", 0.5f, CVar.NOTIFY | CVar.REPLICATED); + /* * Discord */ diff --git a/Resources/ConfigPresets/WizardsDen/salamander.toml b/Resources/ConfigPresets/WizardsDen/salamander.toml index 5049f2a8ea..c195652bac 100644 --- a/Resources/ConfigPresets/WizardsDen/salamander.toml +++ b/Resources/ConfigPresets/WizardsDen/salamander.toml @@ -3,6 +3,7 @@ [game] desc = "Official English Space Station 14 servers. Roleplay required, you must be whitelisted through Discord to play if there are more than 15 online players." hostname = "[EN] Wizard's Den Salamander [US West RP]" +artifact_round_end_timer = 0.0 [server] rules_file = "RP_Rules.txt"