void Update() { var isInShip = _cockpitController.IsPlayerAtFlightConsole(); if (isInShip && !_canInteractWithTools) { SetEnabled(true); } else if (!isInShip && _canInteractWithTools) { SetEnabled(false); } if (_referenceFrameTracker.isActiveAndEnabled && Common.IsUsingAnyTool()) { _referenceFrameTracker.enabled = false; } else if (!_referenceFrameTracker.isActiveAndEnabled && !Common.IsUsingAnyTool()) { _referenceFrameTracker.enabled = true; } if (_referenceFrameTracker.GetReferenceFrame() == null && _referenceFrameTracker.GetPossibleReferenceFrame() == null) { return; } if (OWInput.IsNewlyPressed(InputLibrary.interact)) { _pressedInteract = true; } if (OWInput.IsNewlyHeld(InputLibrary.interact)) { ControllerInput.SimulateInput(XboxAxis.dPadY, 1); _wasHoldingInteract = true; } if (OWInput.IsNewlyReleased(InputLibrary.interact)) { if (_wasHoldingInteract) { ControllerInput.SimulateInput(XboxAxis.dPadY, 0); _wasHoldingInteract = false; } else if (_pressedInteract && !IsFocused(_probe) && !IsFocused(_signalscope) && !IsFocused(_landingCam)) { ControllerInput.SimulateInput(XboxButton.LeftStickClick); } _pressedInteract = false; } }
void OnDetectorExit() { ControllerInput.SimulateInput(XboxAxis.dPadX, 0); }
void OnDetectorEnter() { ControllerInput.SimulateInput(XboxAxis.dPadX, 1); }
void OnRelease() { ControllerInput.SimulateInput(button, 0); receiver.ResetInteraction(); }
void OnPress() { ControllerInput.SimulateInput(button, 1); }
void FlashlightRelease() { ControllerInput.SimulateInput(XboxButton.RightStickClick, 0); }
void FlashlightPress() { ControllerInput.SimulateInput(XboxButton.RightStickClick, 1); }