Made Artifact EORG a server config (#18172)
* Added config and updated sala * CE's suggestion. * Fixed config * greater than
This commit is contained in:
@@ -10,6 +10,8 @@ using Content.Shared.Xenoarchaeology.XenoArtifacts;
|
|||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using Robust.Shared.Random;
|
using Robust.Shared.Random;
|
||||||
using Robust.Shared.Timing;
|
using Robust.Shared.Timing;
|
||||||
|
using Robust.Shared.Configuration;
|
||||||
|
using Content.Shared.CCVar;
|
||||||
|
|
||||||
namespace Content.Server.Xenoarchaeology.XenoArtifacts;
|
namespace Content.Server.Xenoarchaeology.XenoArtifacts;
|
||||||
|
|
||||||
@@ -18,6 +20,7 @@ public sealed partial class ArtifactSystem : EntitySystem
|
|||||||
[Dependency] private readonly IGameTiming _gameTiming = default!;
|
[Dependency] private readonly IGameTiming _gameTiming = default!;
|
||||||
[Dependency] private readonly IRobustRandom _random = default!;
|
[Dependency] private readonly IRobustRandom _random = default!;
|
||||||
[Dependency] private readonly SharedAudioSystem _audio = default!;
|
[Dependency] private readonly SharedAudioSystem _audio = default!;
|
||||||
|
[Dependency] private readonly IConfigurationManager _configurationManager = default!;
|
||||||
|
|
||||||
private ISawmill _sawmill = default!;
|
private ISawmill _sawmill = default!;
|
||||||
|
|
||||||
@@ -300,13 +303,17 @@ public sealed partial class ArtifactSystem : EntitySystem
|
|||||||
/// Make shit go ape on round-end
|
/// Make shit go ape on round-end
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void OnRoundEnd(RoundEndTextAppendEvent ev)
|
private void OnRoundEnd(RoundEndTextAppendEvent ev)
|
||||||
|
{
|
||||||
|
var RoundEndTimer = _configurationManager.GetCVar(CCVars.ArtifactRoundEndTimer);
|
||||||
|
if (RoundEndTimer > 0)
|
||||||
{
|
{
|
||||||
var query = EntityQueryEnumerator<ArtifactComponent>();
|
var query = EntityQueryEnumerator<ArtifactComponent>();
|
||||||
while (query.MoveNext(out var ent, out var artifactComp))
|
while (query.MoveNext(out var ent, out var artifactComp))
|
||||||
{
|
{
|
||||||
artifactComp.CooldownTime = TimeSpan.Zero;
|
artifactComp.CooldownTime = TimeSpan.Zero;
|
||||||
var timerTrigger = EnsureComp<ArtifactTimerTriggerComponent>(ent);
|
var timerTrigger = EnsureComp<ArtifactTimerTriggerComponent>(ent);
|
||||||
timerTrigger.ActivationRate = TimeSpan.FromSeconds(0.5); //HAHAHAHAHAHAHAHAHAH -emo
|
timerTrigger.ActivationRate = TimeSpan.FromSeconds(RoundEndTimer); //HAHAHAHAHAHAHAHAHAH -emo
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -306,6 +306,12 @@ namespace Content.Shared.CCVar
|
|||||||
public static readonly CVarDef<int> GameAlertLevelChangeDelay =
|
public static readonly CVarDef<int> GameAlertLevelChangeDelay =
|
||||||
CVarDef.Create("game.alert_level_change_delay", 30, CVar.SERVERONLY);
|
CVarDef.Create("game.alert_level_change_delay", 30, CVar.SERVERONLY);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 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.
|
||||||
|
/// </summary>
|
||||||
|
public static readonly CVarDef<float> ArtifactRoundEndTimer = CVarDef.Create("game.artifact_round_end_timer", 0.5f, CVar.NOTIFY | CVar.REPLICATED);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Discord
|
* Discord
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
[game]
|
[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."
|
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]"
|
hostname = "[EN] Wizard's Den Salamander [US West RP]"
|
||||||
|
artifact_round_end_timer = 0.0
|
||||||
|
|
||||||
[server]
|
[server]
|
||||||
rules_file = "RP_Rules.txt"
|
rules_file = "RP_Rules.txt"
|
||||||
|
|||||||
Reference in New Issue
Block a user