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

@@ -21,15 +21,4 @@ public sealed partial class MeteorSchedulerComponent : Component
[DataField, AutoPausedField]
public TimeSpan NextSwarmTime = TimeSpan.Zero;
/// <summary>
/// The minimum time between swarms
/// </summary>
[DataField]
public TimeSpan MinSwarmDelay = TimeSpan.FromMinutes(7.5f);
/// <summary>
/// The maximum time between swarms
/// </summary>
[DataField]
public TimeSpan MaxSwarmDelay = TimeSpan.FromMinutes(12.5f);
}