public static bool Update(QuantumInstrument __instance) { if (__instance._gatherWithScope && !__instance._waitToFlickerOut) { __instance._scopeGatherPrompt.SetVisibility(false); if (Locator.GetToolModeSwapper().GetSignalScope().InZoomMode() && Vector3.Angle(__instance.transform.position - Locator.GetPlayerCamera().transform.position, Locator.GetPlayerCamera().transform.forward) < 1f) { __instance._scopeGatherPrompt.SetVisibility(true); if (OWInput.IsNewlyPressed(InputLibrary.interact)) { __instance.Gather(); __instance.GetWorldObject <QSBQuantumInstrument>().SendMessage(new GatherInstrumentMessage()); Locator.GetPromptManager().RemoveScreenPrompt(__instance._scopeGatherPrompt); } } } if (__instance._waitToFlickerOut && Time.time > __instance._flickerOutTime) { __instance.FinishGather(); } return(false); }
static void PostQuantumInstrumentUpdate(QuantumInstrument __instance, bool ____gatherWithScope, bool ____waitToFlickerOut) { if (____gatherWithScope && !____waitToFlickerOut && Locator.GetToolModeSwapper().IsInToolMode(ToolMode.SignalScope)) { Vector3 from = __instance.transform.position - _lensCamera.transform.position; float num = Vector3.Angle(from, _lensCamera.transform.forward); if (num < 1f && _lens.gameObject.activeSelf) { __instance.Invoke("Gather"); } } }
public static void OnPressInteract(QuantumInstrument __instance) => __instance.GetWorldObject <QSBQuantumInstrument>().SendMessage(new GatherInstrumentMessage());