CVarify meteor behavior (#29030)

* CVarify meteor behavior

* Cache value to reduce CVar calls, hook into OnValueChanged

* _cfg is still null at construction time, fixed by just making it set up on Started instead

* Invoke immediately! Learning more every step of the way.

* Move cached value initialisation to Initialize call

* Add explicit supercall
This commit is contained in:
TsjipTsjip
2024-06-15 16:03:20 +02:00
committed by GitHub
parent 7e4c7607e6
commit 71eb4d9178
3 changed files with 29 additions and 13 deletions

View File

@@ -124,6 +124,18 @@ namespace Content.Shared.CCVar
public static readonly CVarDef<float>
EventsRampingAverageChaos = CVarDef.Create("events.ramping_average_chaos", 6f, CVar.ARCHIVE | CVar.SERVERONLY);
/// <summary>
/// Minimum time between meteor swarms in minutes.
/// </summary>
public static readonly CVarDef<float>
MeteorSwarmMinTime = CVarDef.Create("events.meteor_swarm_min_time", 7.5f, CVar.ARCHIVE | CVar.SERVERONLY);
/// <summary>
/// Maximum time between meteor swarms in minutes.
/// </summary>
public static readonly CVarDef<float>
MeteorSwarmMaxTime = CVarDef.Create("events.meteor_swarm_max_time", 12.5f, CVar.ARCHIVE | CVar.SERVERONLY);
/*
* Game
*/