Beispiel #1
0
            static void PreFindFrame(
                OWCamera ____activeCam,
                bool ____isLandingView,
                bool ____isMapView
                )
            {
                if (____isLandingView)
                {
                    return;
                }

                _cameraPosition = ____activeCam.transform.position;
                _cameraRotation = ____activeCam.transform.rotation;

                if (____isMapView)
                {
                    ____activeCam.transform.position = _mapGridRenderer.position + _mapGridRenderer.up * 10000;
                    ____activeCam.transform.rotation = Quaternion.LookRotation(_mapGridRenderer.up * -1);
                }
                else
                {
                    ____activeCam.transform.position = LaserPointer.Laser.position;
                    ____activeCam.transform.rotation = LaserPointer.Laser.rotation;
                }
            }
Beispiel #2
0
        void Start()
        {
            _instance = this;

            NomaiVR.Log("Started FogFix");

            // Make dark bramble lights visible in the fog.
            var fogLightCanvas = GameObject.Find("FogLightCanvas").GetComponent <Canvas>();

            fogLightCanvas.renderMode    = RenderMode.ScreenSpaceCamera;
            fogLightCanvas.worldCamera   = Locator.GetActiveCamera().mainCamera;
            fogLightCanvas.planeDistance = 100;

            // Disable underwater effect.
            GameObject.FindObjectOfType <UnderwaterEffectBubbleController>().gameObject.SetActive(false);

            // Disable water entering and exiting effect.
            var visorEffects = FindObjectOfType <VisorEffectController>();

            visorEffects.SetValue("_waterClearLength", 0);
            visorEffects.SetValue("_waterFadeInLength", 0);

            _camera = Locator.GetPlayerCamera();

            if (LoadManager.GetPreviousScene() == OWScene.TitleScreen && LoadManager.GetCurrentScene() == OWScene.SolarSystem)
            {
                CloseEyes();
            }
        }
 private void SetUpCamera()
 {
     _camera = Locator.GetPlayerCamera();
     _camera.postProcessingSettings.chromaticAberrationEnabled = false;
     _camera.postProcessingSettings.vignetteEnabled            = false;
     _camera.postProcessingSettings.bloom.intensity            = 0.15f;
     DefaultCullingMask = _camera.cullingMask;
 }
 private void Awake()
 {
     _camera            = GetComponent <OWCamera>();
     _audioListener     = GetComponent <AudioListener>();
     _viewerImageEffect = _camera.GetComponent <NomaiViewerImageEffect>();
     _owningPlatform    = GetComponentInParent <CustomNomaiRemoteCameraPlatform>();
     enabled            = false;
 }
Beispiel #5
0
            internal void Start()
            {
                _instance = this;

                _camera = Locator.GetPlayerCamera();

                if (LoadManager.GetPreviousScene() == OWScene.TitleScreen && LoadManager.GetCurrentScene() == OWScene.SolarSystem)
                {
                    CloseEyes();
                }
            }
Beispiel #6
0
            static void PostFindFrame(
                OWCamera ____activeCam,
                bool ____isLandingView
                )
            {
                if (____isLandingView)
                {
                    return;
                }

                ____activeCam.transform.position = _cameraPosition;
                ____activeCam.transform.rotation = _cameraRotation;
            }
 private void Start()
 {
     if (CustomPlatformList == null)
     {
         CustomPlatformList = new List <CustomNomaiRemoteCameraPlatform>(32);
     }
     CustomPlatformList.Add(this);
     _playerCamera = Locator.GetPlayerCamera();
     if (_socket != null)
     {
         _socket.OnSocketableRemoved     += OnSocketableRemoved;
         _socket.OnSocketableDonePlacing += OnSocketableDonePlacing;
     }
     enabled = false;
     QSBPlayerManager.OnRemovePlayer += OnRemovePlayer;
 }
Beispiel #8
0
                private static void PatchTurning(OWCamera ____playerCam, Transform ____transform)
                {
                    var runSpeedX            = _playerAnimator.GetFloat("RunSpeedX");
                    var runSpeedY            = _playerAnimator.GetFloat("RunSpeedY");
                    var isStopped            = runSpeedX + runSpeedY == 0;
                    var isControllerOriented = !isStopped && NomaiVR.Config.controllerOrientedMovement;

                    if ((OWInput.GetInputMode() != InputMode.Character))
                    {
                        return;
                    }

                    var rotationSource = isControllerOriented ? LaserPointer.Behaviour.LeftHandLaser : ____playerCam.transform;

                    var fromTo = Quaternion.FromToRotation(____transform.forward, Vector3.ProjectOnPlane(rotationSource.transform.forward, ____transform.up));

                    var magnitude = 0f;

                    if (!isControllerOriented)
                    {
                        var magnitudeUp      = 1 - Vector3.ProjectOnPlane(rotationSource.transform.up, ____transform.up).magnitude;
                        var magnitudeForward = 1 - Vector3.ProjectOnPlane(rotationSource.transform.up, ____transform.right).magnitude;
                        magnitude = magnitudeUp + magnitudeForward;

                        if (magnitude < 0.3f)
                        {
                            return;
                        }
                    }

                    var targetRotation  = fromTo * ____transform.rotation;
                    var inverseRotation = Quaternion.Inverse(fromTo) * _playArea.rotation;

                    if (isControllerOriented)
                    {
                        _playArea.rotation     = inverseRotation;
                        ____transform.rotation = targetRotation;
                    }
                    else
                    {
                        var maxDegreesDelta = magnitude * 3f;
                        _playArea.rotation     = Quaternion.RotateTowards(_playArea.rotation, inverseRotation, maxDegreesDelta);
                        ____transform.rotation = Quaternion.RotateTowards(____transform.rotation, targetRotation, maxDegreesDelta);
                    }
                }
Beispiel #9
0
            private void SetupScopeLens()
            {
                _lens               = Instantiate(AssetLoader.ScopeLensPrefab).transform;
                _lens.parent        = _signalscope.transform;
                _lens.localPosition = Vector3.forward * 0.14f;
                _lens.localRotation = Quaternion.identity;
                _lens.localScale    = Vector3.one * 2f;
                _lens.gameObject.SetActive(false);

                _lensCamera = _lens.GetComponentInChildren <Camera>();
                _lensCamera.gameObject.SetActive(false);
                _lensCamera.cullingMask      = CameraMaskFix.Behaviour.DefaultCullingMask;
                _lensCamera.cullingMask     &= ~(1 << LayerMask.NameToLayer("UI")) & ~(1 << LayerMask.NameToLayer("VisibleToPlayer"));
                _lensCamera.fieldOfView      = 5;
                _lensCamera.transform.parent = null;
                var followTarget = _lensCamera.gameObject.AddComponent <FollowTarget>();

                followTarget.target             = _lens;
                followTarget.rotationSmoothTime = 0.1f;
                followTarget.positionSmoothTime = 0.1f;

                _owLensCamera = _lensCamera.gameObject.AddComponent <OWCamera>();
                _owLensCamera.useFarCamera      = true;
                _owLensCamera.renderSkybox      = true;
                _owLensCamera.useViewmodels     = true;
                _owLensCamera.farCameraDistance = 50000;
                _owLensCamera.viewmodelFOV      = 70;
                var fogEffect = _lensCamera.gameObject.AddComponent <PlanetaryFogImageEffect>();

                fogEffect.fogShader         = Locator.GetPlayerCamera().GetComponent <PlanetaryFogImageEffect>().fogShader;
                _lensCamera.farClipPlane    = 2000f;
                _lensCamera.nearClipPlane   = 0.1f;
                _lensCamera.depth           = 0f;
                _lensCamera.clearFlags      = CameraClearFlags.Color;
                _lensCamera.backgroundColor = Color.black;
                _lensCamera.gameObject.SetActive(true);

                // The camera on this prefab would istantiate an AudioListener enabled by default
                // which would break 3DAudio and tie it to the hands.
                _owLensCamera.SetEnabled(false);
                _lensCamera.gameObject.GetComponent <AudioListener>().enabled = false;
            }
Beispiel #10
0
        private void OnSceneLoaded(Scene scene, LoadSceneMode mode)
        {
            _freeCam = new GameObject();
            _freeCam.SetActive(false);
            _camera                 = _freeCam.AddComponent <Camera>();
            _camera.clearFlags      = CameraClearFlags.Color;
            _camera.backgroundColor = Color.black;
            _camera.fieldOfView     = 90f;
            _camera.nearClipPlane   = 0.1f;
            _camera.farClipPlane    = 40000f;
            _camera.depth           = 0f;
            _camera.enabled         = false;


            _freeCam.AddComponent <CustomLookAround>();
            _OWCamera = _freeCam.AddComponent <OWCamera>();
            _OWCamera.renderSkybox = true;

            _freeCam.SetActive(true);
        }
Beispiel #11
0
        static bool PatchUpdateInteractVolume(
            InteractZone __instance,
            OWCamera ____playerCam,
            float ____viewingWindow,
            ref bool ____focused
            )
        {
            float num = 2f * Vector3.Angle(-MainClass.interactObject.transform.forward, __instance.transform.forward);

            ____focused = (num <= ____viewingWindow);
            var Base = __instance as SingleInteractionVolume;

            var method = typeof(SingleInteractionVolume).GetMethod("UpdateInteractVolume");
            var ftn    = method.MethodHandle.GetFunctionPointer();
            var func   = (Action)Activator.CreateInstance(typeof(Action), __instance, ftn);

            func();

            return(false);
        }
Beispiel #12
0
                private static ReferenceFrame PostFindFrame(
                    ReferenceFrame __result,
                    OWCamera ____activeCam,
                    ReferenceFrame ____currentReferenceFrame,
                    bool ____isLandingView
                    )
                {
                    if (____isLandingView)
                    {
                        return(__result);
                    }

                    ____activeCam.transform.position = _cameraPosition;
                    ____activeCam.transform.rotation = _cameraRotation;

                    if (IsAnyInteractionFocused())
                    {
                        return(____currentReferenceFrame);
                    }

                    return(__result);
                }
        private void SetupCamera()
        {
            _cameraBase = new GameObject();
            _cameraBase.SetActive(false);
            _cameraBase.transform.parent        = Locator.GetPlayerTransform();
            _cameraBase.transform.localPosition = Vector3.zero;
            _cameraBase.transform.localRotation = Quaternion.Euler(0, 0, 0);

            _cameraObj = new GameObject();
            _cameraObj.transform.parent        = _cameraBase.transform;
            _cameraObj.transform.localPosition = new Vector3(0, 0, -5f);
            _cameraObj.transform.localRotation = Quaternion.Euler(0, 0, 0);
            _camera                 = _cameraObj.AddComponent <Camera>();
            _camera.cullingMask     = Locator.GetPlayerCamera().mainCamera.cullingMask & ~(1 << 27) | (1 << 22);
            _camera.clearFlags      = CameraClearFlags.Color;
            _camera.backgroundColor = Color.black;
            _camera.fieldOfView     = 90f;
            _camera.nearClipPlane   = 0.1f;
            _camera.farClipPlane    = 40000f;
            _camera.depth           = 0f;
            _camera.enabled         = false;
            _owCamera               = _cameraObj.AddComponent <OWCamera>();
            _owCamera.renderSkybox  = true;

            _cameraBase.AddComponent <CameraController>().CameraObject = _cameraObj;

            var screenGrab = _cameraObj.AddComponent <FlashbackScreenGrabImageEffect>();

            screenGrab._downsampleShader = Locator.GetPlayerCamera().gameObject.GetComponent <FlashbackScreenGrabImageEffect>()._downsampleShader;

            var fogImage = _cameraObj.AddComponent <PlanetaryFogImageEffect>();

            fogImage.fogShader = Locator.GetPlayerCamera().gameObject.GetComponent <PlanetaryFogImageEffect>().fogShader;

            _cameraBase.SetActive(true);

            IsSetUp = true;
        }
Beispiel #14
0
 private void Start()
 {
     _activeCam = Locator.GetActiveCamera();
     UpdateRotation();
 }
 public void Activate(CustomNomaiRemoteCameraPlatform controllingPlatform, OWCamera viewer)
 {
     _controllingPlatform = controllingPlatform;
     _controllingCamera   = viewer;
     enabled = true;
 }
Beispiel #16
0
 private void OnSwitchActiveCamera(OWCamera activeCamera)
 {
     _activeCam = activeCamera;
     UpdateRotation();
 }
Beispiel #17
0
        private void Update()
        {
            this.shiftPressed = global::Input.GetKey(KeyCode.LeftShift) || global::Input.GetKey(KeyCode.RightShift);
            this.ctrlPressed  = global::Input.GetKey(KeyCode.LeftControl) || global::Input.GetKey(KeyCode.RightControl);
            this.altPressed   = global::Input.GetKey(KeyCode.LeftAlt) || global::Input.GetKey(KeyCode.RightAlt);
            if (global::Input.GetKeyDown(KeyCode.BackQuote))
            {
                cheatsOn = !cheatsOn;
                if (cheatsOn)
                {
                    AudioSource.PlayClipAtPoint(Locator.GetAudioManager().GetAudioClipArray(global::AudioType.NomaiPowerOn)[0], Locator.GetActiveCamera().transform.position);
                }
                else
                {
                    AudioSource.PlayClipAtPoint(Locator.GetAudioManager().GetAudioClipArray(global::AudioType.NomaiPowerOff)[0], Locator.GetActiveCamera().transform.position);
                }
            }

            if (playersuit == null)
            {
                playersuit = Locator.GetPlayerSuit();
            }
            if (playersuit == null)
            {
                return;
            }
            if (!playersuit.enabled)
            {
                playersuit = Locator.GetPlayerSuit();
            }
            if (playersuit == null || !playersuit.enabled)
            {
                return;
            }
            if (cheatsOn)
            {
                /*if (global::Input.GetKeyDown(DebugKeyCode.destroyTimeline))
                 *              {
                 *                      Debug.Log("Try DestroyTimeline (Requires NomaiExperimentBlackHole)");
                 *                      GlobalMessenger.FireEvent("DebugTimelineDestroyed");
                 *              }
                 *              if (global::Input.GetKeyDown(DebugKeyCode.uiTestAndSuicide))
                 *              {
                 *                      Locator.GetPlayerTransform().GetComponent<PlayerResources>().SetDebugKillResources(true);
                 *              }
                 *              if (global::Input.GetKeyUp(DebugKeyCode.uiTestAndSuicide))
                 *              {
                 *                      Locator.GetPlayerTransform().GetComponent<PlayerResources>().SetDebugKillResources(false);
                 *              }*/
                if (ModHelper.Input.IsNewlyPressed(inputs["(tele) Save probe's pos"]))
                {
                    if (Locator.GetProbe().GetAnchor().IsAnchored())
                    {
                        Transform transform = Locator.GetProbe().transform;
                        _relativeBody[relIndex] = transform.parent.GetAttachedOWRigidbody(false);
                        _relativeData[relIndex] = new RelativeLocationData(Locator.GetProbe().GetAnchor().GetAttachedOWRigidbody(), _relativeBody[relIndex], null);
                        this.COn = true;
                    }
                }
                if (ModHelper.Input.IsNewlyPressed(inputs["(tele) Save RayCast pos"]))
                {
                    OWCamera activeCamera = Locator.GetActiveCamera();
                    Vector3  position     = new Vector3((float)(activeCamera.pixelWidth - 1) / 2f, (float)(activeCamera.pixelHeight - 1) / 2f);
                    if (!Physics.Raycast(activeCamera.ScreenPointToRay(position), out hit, float.PositiveInfinity, OWLayerMask.BuildPhysicalMask().value))
                    {
                        foreach (RaycastHit raycastHit in Physics.RaycastAll(activeCamera.ScreenPointToRay(position), float.PositiveInfinity, OWLayerMask.BuildPhysicalMask().value | 524288))
                        {
                            hit = raycastHit;
                            if (raycastHit.collider.GetAttachedOWRigidbody(false))
                            {
                                break;
                            }
                        }
                        if (!hit.collider.GetAttachedOWRigidbody(false))
                        {
                            foreach (RaycastHit raycastHit2 in Physics.RaycastAll(activeCamera.ScreenPointToRay(position)))
                            {
                                hit = raycastHit2;
                                if (raycastHit2.collider.GetAttachedOWRigidbody(false))
                                {
                                    break;
                                }
                            }
                        }
                    }
                    if (hit.collider.GetAttachedOWRigidbody(false))
                    {
                        _hasSetWarpPoint[relIndex] = true;
                        _relativeBody[relIndex]    = hit.rigidbody.GetAttachedOWRigidbody(false);
                        _relativeData[relIndex]    = relconstr(hit.point, Quaternion.FromToRotation(Locator.GetPlayerBody().transform.up, hit.normal) * Locator.GetPlayerBody().transform.rotation, _relativeBody[relIndex].GetPointVelocity(hit.point), _relativeBody[relIndex], null);
                        this.COn = true;
                    }
                }
                if (ModHelper.Input.IsNewlyPressed(inputs["(tele) Save player's pos"]) && Locator.GetPlayerSectorDetector().GetLastEnteredSector() != null)
                {
                    _hasSetWarpPoint[relIndex] = true;
                    _relativeBody[relIndex]    = Locator.GetPlayerSectorDetector().GetLastEnteredSector().GetOWRigidbody();
                    _relativeData[relIndex]    = new RelativeLocationData(Locator.GetPlayerBody(), _relativeBody[relIndex], null);
                    this.COn = true;
                }
                if (ModHelper.Input.IsNewlyPressed(inputs["(insp) Cycle through layers"]))
                {
                    rayMask++;
                    rayMask %= 32;
                }
                if (ModHelper.Input.IsNewlyPressed(inputs["(insp) RayCast"]))
                {
                    OWCamera activeCamera2 = Locator.GetActiveCamera();
                    Vector3  position2     = new Vector3((float)(activeCamera2.pixelWidth - 1) / 2f, (float)(activeCamera2.pixelHeight - 1) / 2f);
                    if (!Physics.Raycast(activeCamera2.ScreenPointToRay(position2), out hit, float.PositiveInfinity, 1 << rayMask) && hit.collider.GetAttachedOWRigidbody(false))
                    {
                        _hasSetWarpPoint[relIndex] = true;
                        _relativeBody[relIndex]    = hit.rigidbody.GetAttachedOWRigidbody(false);
                        _relativeData[relIndex]    = relconstr(hit.point, Quaternion.FromToRotation(Locator.GetPlayerBody().transform.up, hit.normal) * Locator.GetPlayerBody().transform.rotation, _relativeBody[relIndex].GetPointVelocity(hit.point), _relativeBody[relIndex], null);
                        this.COn = true;
                    }
                }
                if (ModHelper.Input.IsNewlyPressed(inputs["(tele) Cycle through pos"]))
                {
                    this.COn = true;
                    relIndex++;
                    relIndex %= 10;
                }
                if (ModHelper.Input.IsNewlyPressed(inputs["(tele) Tele to saved pos"]) && _hasSetWarpPoint[relIndex])
                {
                    this.COn = true;
                    this._gotoWarpPointNextFrame = true;
                }
                if (ModHelper.Input.IsNewlyPressed(inputs["Learn launchcode"]))
                {
                    if (PlayerData.IsLoaded())
                    {
                        PlayerData.LearnLaunchCodes();
                        this.COn = true;
                    }
                }
                if (ModHelper.Input.IsNewlyPressed(inputs["Toggle spacesuit"]))
                {
                    if (!Locator.GetPlayerSuit().IsWearingSuit(true))
                    {
                        Locator.GetPlayerSuit().SuitUp(false, false);
                        this.COn = true;
                    }
                    else
                    {
                        Locator.GetPlayerSuit().RemoveSuit(false);
                        this.COff = true;
                    }
                }
                if (ModHelper.Input.IsNewlyPressed(inputs["Toggle HUD"]))
                {
                    hiddenHUD = !hiddenHUD;
                    if (hiddenHUD)
                    {
                        oldmode = (int)typeof(GUIMode).GetAnyField("_renderMode").GetValue(null);
                        typeof(GUIMode).GetAnyField("_renderMode").SetValue(null, 7);
                        this.COn = true;
                    }
                    else
                    {
                        typeof(GUIMode).GetAnyField("_renderMode").SetValue(null, oldmode);
                        this.COff = true;
                    }
                    GlobalMessenger.FireEvent("OnChangeGUIMode");
                }
                if (ModHelper.Input.IsNewlyPressed(inputs["Toggle helmet"]) && Locator.GetPlayerSuit() && Locator.GetPlayerSuit().IsWearingSuit(true))
                {
                    if (Locator.GetPlayerSuit().IsWearingHelmet())
                    {
                        Locator.GetPlayerSuit().RemoveHelmet();
                        this.COff = true;
                    }
                    else
                    {
                        Locator.GetPlayerSuit().PutOnHelmet();
                        this.COn = true;
                    }
                }
                if (ModHelper.Input.IsNewlyPressed(inputs["Destroy ship"]) && Locator.GetShipTransform())
                {
                    UnityEngine.Object.Destroy(Locator.GetShipTransform().gameObject);
                    this.COn = true;
                }
                if (ModHelper.Input.IsNewlyPressed(inputs["Damage ship"]) && Locator.GetShipTransform())
                {
                    ShipComponent[] componentsInChildren = Locator.GetShipTransform().GetComponentsInChildren <ShipComponent>();
                    for (int k = 0; k < componentsInChildren.Length; k++)
                    {
                        componentsInChildren[k].SetDamaged(true);
                    }
                    this.COn = true;
                }
                if (ModHelper.Input.IsNewlyPressed(inputs["Fuel+heal"]))
                {
                    Locator.GetPlayerTransform().GetComponent <PlayerResources>().DebugRefillResources();
                    if (Locator.GetShipTransform())
                    {
                        ShipComponent[] componentsInChildren2 = Locator.GetShipTransform().GetComponentsInChildren <ShipComponent>();
                        for (int l = 0; l < componentsInChildren2.Length; l++)
                        {
                            componentsInChildren2[l].SetDamaged(false);
                        }
                    }
                    this.COn = true;
                }
                if (ModHelper.Input.IsPressed(inputs["Increase Ludicrous Speed"]))
                {
                    this.ludicrousMult *= 2f;
                    this.COn            = true;
                }
                if (ModHelper.Input.IsPressed(inputs["Decrease Ludicrous Speed"]))
                {
                    this.ludicrousMult /= 2f;
                    this.COff           = true;
                }
                if (ModHelper.Input.IsNewlyPressed(inputs["Engage Ludicrous Speed"]))
                {
                    this._engageLudicrousSpeed = true;
                    AudioSource.PlayClipAtPoint(Locator.GetAudioManager().GetAudioClipArray(global::AudioType.ToolProbeLaunch)[0], Locator.GetShipBody().transform.position);
                }
                if (ModHelper.Input.IsNewlyPressed(inputs["Toggle superjetpack"]) && Locator.GetPlayerSuit().GetComponent <JetpackThrusterModel>())
                {
                    if (!this.wasBoosted)
                    {
                        this.jetpackStanard = Locator.GetPlayerSuit().GetComponent <JetpackThrusterModel>().GetMaxTranslationalThrust();
                        Locator.GetPlayerSuit().GetComponent <JetpackThrusterModel>().TAIcheat_SetTranslationalThrust(50f);
                    }
                    else
                    {
                        Locator.GetPlayerSuit().GetComponent <JetpackThrusterModel>().TAIcheat_SetTranslationalThrust(this.jetpackStanard);
                    }
                    this.wasBoosted = !this.wasBoosted;
                    if (this.wasBoosted)
                    {
                        this.COn = true;
                    }
                    else
                    {
                        this.COff = true;
                    }
                }
                if (ModHelper.Input.IsNewlyPressed(inputs["Toggle PowerOverwhelming"]))
                {
                    Locator.GetPlayerTransform().GetComponent <PlayerResources>().ToggleInvincibility();
                    Locator.GetDeathManager().ToggleInvincibility();
                    Transform shipTransform = Locator.GetShipTransform();
                    if (shipTransform)
                    {
                        shipTransform.GetComponentInChildren <ShipDamageController>().ToggleInvincibility();
                        invincible = !invincible;
                    }
                    if (invincible)
                    {
                        this.COn = true;
                    }
                    else
                    {
                        this.COff = true;
                    }
                }
                if (ModHelper.Input.IsNewlyPressed(inputs["Learn all frequencies"]))
                {
                    if (PlayerData.KnowsMultipleFrequencies())
                    {
                        PlayerData.ForgetFrequency(SignalFrequency.Quantum);
                        PlayerData.ForgetFrequency(SignalFrequency.EscapePod);
                        PlayerData.ForgetFrequency(SignalFrequency.Statue);
                        PlayerData.ForgetFrequency(SignalFrequency.WarpCore);
                        PlayerData.ForgetFrequency(SignalFrequency.HideAndSeek);
                        this.COff = true;
                    }
                    else
                    {
                        this.COn = true;
                        for (int m = 10; m < 16; m++)
                        {
                            PlayerData.LearnSignal((SignalName)m);
                        }
                        PlayerData.LearnFrequency(SignalFrequency.Quantum);
                        for (int n = 20; n < 26; n++)
                        {
                            PlayerData.LearnSignal((SignalName)n);
                        }
                        PlayerData.LearnFrequency(SignalFrequency.EscapePod);
                        for (int num = 30; num < 33; num++)
                        {
                            PlayerData.LearnSignal((SignalName)num);
                        }
                        PlayerData.LearnFrequency(SignalFrequency.Statue);
                        PlayerData.LearnFrequency(SignalFrequency.WarpCore);
                        for (int num2 = 40; num2 < 50; num2++)
                        {
                            PlayerData.LearnSignal((SignalName)num2);
                        }
                        PlayerData.LearnFrequency(SignalFrequency.HideAndSeek);
                        for (int num3 = 60; num3 < 63; num3++)
                        {
                            PlayerData.LearnSignal((SignalName)num3);
                        }
                    }
                }
                if (ModHelper.Input.IsNewlyPressed(inputs["Reveal all facts"]))
                {
                    Locator.GetShipLogManager().RevealAllFacts(this._revealRumorsOnly);
                    this._revealRumorsOnly = false;
                    this.COn = true;
                }
                if (ModHelper.Input.IsNewlyPressed(inputs["Cycle DebugHUD"]))
                {
                    inputHUD++;
                    inputHUD %= 5;
                }
                if (ModHelper.Input.IsNewlyPressed(inputs["Toggle player collision extra"]))
                {
                    if (Locator.GetPlayerBody().GetRequiredComponent <Rigidbody>().detectCollisions)
                    {
                        Locator.GetPlayerBody().DisableCollisionDetection();
                        this.COn = true;
                    }
                    else
                    {
                        Locator.GetPlayerBody().EnableCollisionDetection();
                        this.COff = true;
                    }
                }
                if (ModHelper.Input.IsNewlyPressed(inputs["Toggle player collision"]))
                {
                    foreach (Collider collider in Locator.GetPlayerBody().GetComponentsInChildren <Collider>())
                    {
                        if (!collider.isTrigger)
                        {
                            collider.enabled = !collider.enabled;
                            if (collider.enabled)
                            {
                                this.COff = true;
                            }
                            else
                            {
                                this.COn = true;
                            }
                        }
                    }
                }
                if (ModHelper.Input.IsNewlyPressed(inputs["Toggle ship collision extra"]))
                {
                    if (Locator.GetShipBody().GetRequiredComponent <Rigidbody>().detectCollisions)
                    {
                        Locator.GetShipBody().DisableCollisionDetection();
                        this.COn = true;
                    }
                    else
                    {
                        Locator.GetShipBody().EnableCollisionDetection();
                        this.COff = true;
                    }
                }
                if (ModHelper.Input.IsNewlyPressed(inputs["Toggle ship collision"]))
                {
                    foreach (Collider collider2 in Locator.GetShipTransform().GetComponentsInChildren <Collider>())
                    {
                        if (!collider2.isTrigger)
                        {
                            collider2.enabled = !collider2.enabled;
                            if (collider2.enabled)
                            {
                                this.COff = true;
                            }
                            else
                            {
                                this.COn = true;
                            }
                        }
                    }
                }
                if (ModHelper.Input.IsNewlyPressed(inputs["Disable nearby Anglerfishes"]))
                {
                    foreach (AnglerfishController anglerfishController in UnityEngine.Object.FindObjectsOfType <AnglerfishController>())
                    {
                        anglerfishController.gameObject.SetActive(!anglerfishController.gameObject.activeInHierarchy);
                        if (anglerfishController.gameObject.activeInHierarchy)
                        {
                            this.COff = true;
                        }
                        else
                        {
                            this.COn = true;
                        }
                    }
                }
                if (ModHelper.Input.IsNewlyPressed(inputs["Toggle nearby Anglerfishes AI"]))
                {
                    foreach (AnglerfishController anglerfishController in UnityEngine.Object.FindObjectsOfType <AnglerfishController>())
                    {
                        anglerfishController.enabled = !anglerfishController.enabled;
                        if (anglerfishController.enabled)
                        {
                            this.COff = true;
                        }
                        else
                        {
                            this.COn = true;
                        }
                    }
                }
            }
            if (ModHelper.Input.IsNewlyPressed(inputs["Break all BH fragments"]))
            {
                this.COn = true;
                FragmentIntegrity[] array2 = UnityEngine.Object.FindObjectsOfType <FragmentIntegrity>();
                for (int j = 0; j < array2.Length; j++)
                {
                    array2[j].AddDamage(10000f);
                }
            }
            if (ModHelper.Input.IsNewlyPressed(inputs["Trigger Supernova"]))
            {
                this.COn = true;
                GlobalMessenger.FireEvent("TriggerSupernova");
            }
            if (ModHelper.Input.IsNewlyPressed(inputs["Debug Vessel Warp"]))
            {
                if (PlayerData.GetWarpedToTheEye())
                {
                    PlayerData.SaveEyeCompletion();
                }
                else
                {
                    GlobalMessenger.FireEvent("DebugWarpVessel");
                }
                this.COn = true;
            }
            if (Mathf.Abs(Time.timeScale - 1f) < 1e-4 || Mathf.Abs(Time.timeScale - 10f) < 1e-4)
            {
                if (ModHelper.Input.IsNewlyPressed(inputs["Timelapse"]))
                {
                    Time.timeScale = 10f;
                }
                else if (Mathf.Abs(Time.timeScale - 1f) > 1e-4 && !ModHelper.Input.IsPressed(inputs["Timelapse"]))
                {
                    Time.timeScale = 1f;
                }
            }

            if (this.COn)
            {
                AudioClip[] audioClipArray = Locator.GetAudioManager().GetAudioClipArray(global::AudioType.Menu_Confirm);
                AudioSource.PlayClipAtPoint(audioClipArray[UnityEngine.Random.Range(0, audioClipArray.Length)], Locator.GetActiveCamera().transform.position);
                this.COn = false;
            }
            if (this.COff)
            {
                AudioClip[] audioClipArray2 = Locator.GetAudioManager().GetAudioClipArray(global::AudioType.Menu_Cancel);
                AudioSource.PlayClipAtPoint(audioClipArray2[UnityEngine.Random.Range(0, audioClipArray2.Length)], Locator.GetActiveCamera().transform.position);
                this.COff = false;
            }
        }