public static void Postfix(ref CyclopsHelmHUDManager __instance)
        {
            CyclopsHUDManager hudMgr = CyclopsManager.GetHUDManager(__instance.subRoot);

            if (hudMgr == null)
            {
                return;
            }

            hudMgr.UpdateHelmHUD(__instance);
        }
 /// <summary>
 /// Registers a <see cref="CyclopsStatusIconCreator"/> method that creates a new <see cref="StatusIcons.CyclopsStatusIcon"/> on demand.<para/>
 /// This method will be invoked only once for each Cyclops sub in the game world.
 /// </summary>
 /// <typeparam name="T">Your class that implements <see cref="StatusIcons.CyclopsStatusIcon"/>.</typeparam>
 /// <param name="createEvent">A method that takes a <see cref="SubRoot"/> parameter a returns a new instance of <see langword="abstract"/><see cref="StatusIcons.CyclopsStatusIcon"/>.</param>
 public void CyclopsStatusIcon <T>(CyclopsStatusIconCreator createEvent)
     where T : CyclopsStatusIcon
 {
     if (CyclopsHUDManager.TooLateToRegister)
     {
         QuickLogger.Error("CyclopsStatusIconCreator have already been invoked. This method should only be called during patch time.");
     }
     else
     {
         CyclopsHUDManager.RegisterStatusIconCreator(createEvent, typeof(T).Name);
     }
 }
        public static bool Prefix(ref CyclopsUpgradeConsoleHUDManager __instance)
        {
            CyclopsHUDManager hudMgr = CyclopsManager.GetHUDManager(__instance.subRoot);

            if (hudMgr == null)
            {
                return(true);
            }

            hudMgr.UpdateConsoleHUD(__instance);

            return(false);
        }
示例#4
0
        public static bool Prefix(ref CyclopsUpgradeConsoleHUDManager __instance)
        {
            PdaOverlayManager.UpdateIconOverlays();

            CyclopsHUDManager hudMgr = CyclopsManager.GetManager(__instance.subRoot)?.HUD;

            if (hudMgr == null)
            {
                return(true);
            }

            hudMgr.SlowUpdate(__instance);

            return(false);
        }