[ShadowCloneFallback] Fixed option condition being inverted

This commit is contained in:
NotAKidoS 2024-04-23 17:08:45 -05:00
parent ca9d35499d
commit f12fb89fc0

View file

@ -10,18 +10,18 @@ public class ShadowCloneFallback : MelonMod
private static readonly MelonPreferences_Category Category =
MelonPreferences.CreateCategory(SettingsCategory);
private static readonly MelonPreferences_Entry<bool> EntryEnabled =
Category.CreateEntry("Enabled", true, description: "Toggle ShadowCloneFallback entirely.");
private static readonly MelonPreferences_Entry<bool> EntryUseFallbackClones =
Category.CreateEntry("Use Fallback Clones", true, description: "Toggle ShadowCloneFallback entirely.");
public override void OnInitializeMelon()
{
ShadowCloneUtils.s_UseShaderClones = EntryEnabled.Value;
EntryEnabled.OnEntryValueChanged.Subscribe(OnEnabledChanged);
ShadowCloneUtils.s_UseShaderClones = EntryUseFallbackClones.Value;
EntryUseFallbackClones.OnEntryValueChanged.Subscribe(OnEnabledChanged);
}
private void OnEnabledChanged(bool _, bool __)
{
ShadowCloneUtils.s_UseShaderClones = EntryEnabled.Value;
LoggerInstance.Msg($"ShadowCloneUtils.s_UseShaderClones is now {(EntryEnabled.Value ? "enabled" : "disabled")}.");
ShadowCloneUtils.s_UseShaderClones = !EntryUseFallbackClones.Value;
LoggerInstance.Msg($"ShadowCloneFallback is now {(EntryUseFallbackClones.Value ? "enabled" : "disabled")}.");
}
}