public static bool Prefix(uGUI_DepthCompass __instance) { if (Player.main != null) { int altitude = (int)Player.main.transform.position.y; var depth = Mathf.FloorToInt(Player.main.GetDepth()); var mainAlt = Math.Sign(altitude); if (mainAlt >= 1 && depth == 0) { if (MainPatch.ToggleSymbol) { __instance.submersibleDepthSuffix.text = "m ^"; __instance.submersibleDepth.text = altitude.ToString(); __instance.suffixText.text = "m ^"; __instance.depthText.text = altitude.ToString(); } else { __instance.submersibleDepthSuffix.text = "m"; __instance.submersibleDepth.text = altitude.ToString(); __instance.suffixText.text = "m"; __instance.depthText.text = altitude.ToString(); } } else { __instance.submersibleDepthSuffix.text = "m"; } } return(true); }
public static bool Prefix(ref uGUI_DepthCompass __instance) { Ocean.DepthClass depthClass = Player.main.GetDepthClass(); if (__instance._cachedDepthClass != depthClass) { __instance._cachedDepthClass = depthClass; if (__instance._depthMode == uGUI_DepthCompass.DepthMode.Player) { __instance.UpdateHalfMoonSprite(); } } switch (depthClass) { case Ocean.DepthClass.Unsafe: case Ocean.DepthClass.Crush: __instance.shadow.sprite = __instance.shadowDanger; MaterialExtensions.SetBlending(__instance.shadow.material, Blending.AlphaBlend, false); __instance.depthText.color = __instance.textColorDanger; __instance.suffixText.color = __instance.textColorDanger; return(false); } __instance.shadow.sprite = __instance.shadowNormal; MaterialExtensions.SetBlending(__instance.shadow.material, Blending.Multiplicative, true); __instance.depthText.color = __instance.textColorNormal; __instance.suffixText.color = __instance.textColorNormal; return(false); }
public static bool Prefix(ref uGUI_DepthCompass __instance, ref bool __result) { if (__instance == null) { __result = false; return(false); } if (!__instance._initialized) { __result = false; return(false); } if (!uGUI.isMainLevel) { __result = false; return(false); } if (LaunchRocket.isLaunching) { __result = false; return(false); } if (uGUI.isIntro) { __result = false; return(false); } Player main = Player.main; if (main == null) { __result = false; return(false); } PDA pda = main.GetPDA(); if (pda != null && pda.isInUse) { __result = false; return(false); } Player.Mode mode = main.GetMode(); if (mode == Player.Mode.Piloting) { __result = false; return(false); } Inventory main2 = Inventory.main; if (main2 != null && main2.equipment != null && TechTypeCheck(main2)) { __result = true; return(false); } uGUI_CameraDrone main3 = uGUI_CameraDrone.main; __result = main3 != null && main3.GetCamera() != null; return(false); }
public static bool Prefix(uGUI_DepthCompass __instance) { if (Player.main != null) { int altitude = (int)Player.main.transform.position.y; var depth = Mathf.FloorToInt(Player.main.GetDepth()); if (altitude != 0 && depth == 0) { __instance.depthText.text = altitude.ToString(); __instance.suffixText.text = "m↑"; } } return(true); }
public static void Postfix(ref uGUI_DepthCompass __instance) { __instance.gameObject.AddComponent <BendsHUDController>(); }
public static void Postfix(ref uGUI_DepthCompass __instance) { __instance.gameObject.AddComponent <BiomeDisplay>(); }
public static void Postfix(uGUI_DepthCompass __instance) { onLateUpdate?.Invoke(); }
public static void UpdateDepth(uGUI_DepthCompass __instance) { //ErrorMessage.AddMessage("Y = " + __instance.gameObject.transform.localPosition.y); //ErrorMessage.AddMessage("Y = " + __instance.gameObject.transform.position.y); }
internal static void Postfix(uGUI_DepthCompass __instance) { EquipmentConfiguration.RefreshPDA(); }
internal static void Postfix(uGUI_DepthCompass __instance) { }