mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 06:19:22 +00:00
Tweak for latest experimental.
Replaced PlayerSetup _inVr check.
This commit is contained in:
parent
2b4f306040
commit
24d8c6a3ec
4 changed files with 17 additions and 17 deletions
|
@ -1,4 +1,5 @@
|
|||
using ABI_RC.Core.Player;
|
||||
using ABI_RC.Core.Savior;
|
||||
using MelonLoader;
|
||||
|
||||
namespace Blackout;
|
||||
|
@ -28,14 +29,10 @@ public class Blackout : MelonMod
|
|||
m_entryDrowsyDimStrength = m_categoryBlackout.CreateEntry<float>("Drowsy Dim Strength", 0.5f, description: "How strong of a dimming effect should drowsy mode have.");
|
||||
m_categoryBlackout.SaveToFile(false);
|
||||
|
||||
m_entryEnabled.OnEntryValueChangedUntyped.Subscribe(OnUpdateEnabled);
|
||||
m_entryHudMessages.OnEntryValueChangedUntyped.Subscribe(OnUpdateSettings);
|
||||
m_entryDropFPSOnSleep.OnEntryValueChangedUntyped.Subscribe(OnUpdateSettings);
|
||||
m_entryDrowsyThreshold.OnEntryValueChangedUntyped.Subscribe(OnUpdateSettings);
|
||||
m_entryAwakeThreshold.OnEntryValueChangedUntyped.Subscribe(OnUpdateSettings);
|
||||
m_entryDrowsyModeTimer.OnEntryValueChangedUntyped.Subscribe(OnUpdateSettings);
|
||||
m_entrySleepModeTimer.OnEntryValueChangedUntyped.Subscribe(OnUpdateSettings);
|
||||
m_entryDrowsyDimStrength.OnEntryValueChangedUntyped.Subscribe(OnUpdateSettings);
|
||||
foreach (var setting in m_categoryBlackout.Entries)
|
||||
{
|
||||
setting.OnEntryValueChangedUntyped.Subscribe(OnUpdateSettings);
|
||||
}
|
||||
|
||||
//UIExpansionKit addon
|
||||
if (MelonMod.RegisteredMelons.Any(it => it.Info.Name == "UI Expansion Kit"))
|
||||
|
@ -55,7 +52,7 @@ public class Blackout : MelonMod
|
|||
while (PlayerSetup.Instance == null)
|
||||
yield return null;
|
||||
|
||||
inVR = PlayerSetup.Instance._inVr;
|
||||
inVR = MetaPort.Instance.isUsingVr;
|
||||
PlayerSetup.Instance.gameObject.AddComponent<BlackoutController>();
|
||||
|
||||
//update BlackoutController settings after it initializes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue