Add Update Rate floats

This commit is contained in:
NotAKidoS 2023-03-16 02:40:29 -05:00
parent 586e20d663
commit 6106aba215
2 changed files with 10 additions and 3 deletions

View file

@ -15,6 +15,12 @@ public class FuckMetricsMod : MelonMod
public static readonly MelonPreferences_Entry<SettingState> EntryDisableCoreUpdates =
CategoryFuckMetrics.CreateEntry("Menu Core Updates", SettingState.MenuOnly, description: "Disables menu core updates (Gamerule Icons & Debug Status). Updates once on menu open if disabled.");
public static readonly MelonPreferences_Entry<float> EntryMetricsUpdateRate =
CategoryFuckMetrics.CreateEntry("Metrics Update Rate", 1f, description: "Sets the update rate for the menu metrics. Default is 0.5f. Recommended to be 1f or higher.");
public static readonly MelonPreferences_Entry<float> EntryCoreUpdateRate =
CategoryFuckMetrics.CreateEntry("Core Update Rate", 2f, description: "Sets the update rate for the menu core updates. Default is 0.1f. Recommended to be 2f or higher.");
public enum SettingState
{
Always,
@ -33,7 +39,8 @@ public class FuckMetricsMod : MelonMod
IEnumerator WaitForLocalPlayer()
{
yield return PlayerSetup.Instance != null;
while (PlayerSetup.Instance == null)
yield return null;
UpdateSettings();
}