Exemplo n.º 1
0
        public static void SetConfig(IModConfig config)
        {
            OverrideRefreshRate        = config.GetSettingsValue <int>("refreshRateOverride");
            VibrationStrength          = config.GetSettingsValue <float>("vibrationIntensity");
            ShowHelmet                 = config.GetSettingsValue <bool>("helmetVisibility");
            ControllerOrientedMovement = config.GetSettingsValue <bool>("movementControllerOriented");
            EnableGesturePrompts       = config.GetSettingsValue <bool>("showGesturePrompts");
            PreventCursorLock          = config.GetSettingsValue <bool>("disableCursorLock");
            DebugMode         = config.GetSettingsValue <bool>("debug");
            AutoHideToolbelt  = config.GetSettingsValue <bool>("autoHideToolbelt");
            HudScale          = config.GetSettingsValue <float>("hudScale");
            BypassFatalErrors = config.GetSettingsValue <bool>("bypassFatalErrors");

            // OWML doesn't support negative slider values so I subtract it here.
            ToolbeltHeight = config.GetSettingsValue <float>("toolbeltHeight") - 1f;

            if (PreventCursorLock)
            {
                NomaiVRPatch.Empty <CursorManager>("Update");
                Cursor.lockState = CursorLockMode.None;
                Cursor.visible   = true;
            }

            OnConfigChange?.Invoke();
        }
Exemplo n.º 2
0
        public ModConfig(IModConfig config)
        {
            overrideRefreshRate        = config.GetSettingsValue <int>("refreshRateOverride");
            vibrationStrength          = config.GetSettingsValue <float>("vibrationIntensity");
            showHelmet                 = config.GetSettingsValue <bool>("helmetVisibility");
            hideHudInConversations     = config.GetSettingsValue <bool>("hideHudDuringDialogue");
            controllerOrientedMovement = config.GetSettingsValue <bool>("movementControllerOriented");
            enableGesturePrompts       = config.GetSettingsValue <bool>("showGesturePrompts");
            preventCursorLock          = config.GetSettingsValue <bool>("disableCursorLock");
            debugMode = config.GetSettingsValue <bool>("debug");

            if (preventCursorLock)
            {
                NomaiVRPatch.Empty <CursorManager>("Update");
                Cursor.lockState = CursorLockMode.None;
                Cursor.visible   = true;
            }
        }