mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 22:39:22 +00:00
[ShadowCloneFallback] Initial Release
This commit is contained in:
parent
6c7a3259e7
commit
169df4ed33
6 changed files with 103 additions and 4 deletions
27
ShadowCloneFallback/Main.cs
Normal file
27
ShadowCloneFallback/Main.cs
Normal file
|
@ -0,0 +1,27 @@
|
|||
using ABI_RC.Core.Player.ShadowClone;
|
||||
using MelonLoader;
|
||||
|
||||
namespace NAK.ShadowCloneFallback;
|
||||
|
||||
public class ShadowCloneFallback : MelonMod
|
||||
{
|
||||
private const string SettingsCategory = nameof(ShadowCloneFallback);
|
||||
|
||||
private static readonly MelonPreferences_Category Category =
|
||||
MelonPreferences.CreateCategory(SettingsCategory);
|
||||
|
||||
private static readonly MelonPreferences_Entry<bool> EntryEnabled =
|
||||
Category.CreateEntry("Enabled", true, description: "Toggle ShadowCloneFallback entirely.");
|
||||
|
||||
public override void OnInitializeMelon()
|
||||
{
|
||||
ShadowCloneUtils.s_UseShaderClones = EntryEnabled.Value;
|
||||
EntryEnabled.OnEntryValueChanged.Subscribe(OnEnabledChanged);
|
||||
}
|
||||
|
||||
private void OnEnabledChanged(bool _, bool __)
|
||||
{
|
||||
ShadowCloneUtils.s_UseShaderClones = EntryEnabled.Value;
|
||||
LoggerInstance.Msg($"ShadowCloneUtils.s_UseShaderClones is now {(EntryEnabled.Value ? "enabled" : "disabled")}.");
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue