public static void Postfix(ref CyclopsUpgradeConsoleHUDManager __instance)
        {
            var cyclopsManager = CyclopsManager.GetAllManagers(__instance.subRoot);

            if (cyclopsManager == null)
            {
                return;
            }

            cyclopsManager.UpgradeManager.SyncUpgradeConsoles();

            cyclopsManager.PowerManager.UpdateConsoleHUD(__instance);
        }
Ejemplo n.º 2
0
        internal void ConnectToCyclops(SubRoot parentCyclops, CyclopsManager manager = null)
        {
            this.ParentCyclops = parentCyclops;
            this.transform.SetParent(parentCyclops.transform);
            this.Manager = manager ?? CyclopsManager.GetAllManagers(parentCyclops);

            UpgradeManager upgradeManager = this.Manager.UpgradeManager;

            if (!upgradeManager.AuxUpgradeConsoles.Contains(this))
            {
                upgradeManager.AuxUpgradeConsoles.Add(this);
            }

            Equipment console = this.Modules;

            upgradeManager.AttachEquipmentEvents(ref console);
            QuickLogger.Debug("Auxiliary Upgrade Console has been connected", true);
        }
Ejemplo n.º 3
0
        public void ConnectToCyclops(SubRoot parentCyclops, CyclopsManager manager = null)
        {
            if (ParentCyclops != null)
            {
                return;
            }

            ParentCyclops = parentCyclops;
            this.transform.SetParent(parentCyclops.transform);
            Manager = manager ?? CyclopsManager.GetAllManagers(parentCyclops);

            if (!Manager.ChargeManager.CyBioReactors.Contains(this))
            {
                Manager.ChargeManager.CyBioReactors.Add(this);
            }

            UpdateBoosterCount(Manager.ChargeManager.BioBoosters.Count);
            QuickLogger.Debug("Bioreactor has been connected to Cyclops", true);
        }
 /// <summary>
 /// Gets all typed <see cref="IAuxCyclopsManager" />s across all Cyclops subs.
 /// </summary>
 /// <typeparam name="T">The class you created that implements <see cref="IAuxCyclopsManager" />.</typeparam>
 /// <returns>
 /// A type casted enumeration of all <see cref="IAuxCyclopsManager" />s found across all Cyclops subs, identified by name.
 /// </returns>
 public IEnumerable <T> AllAuxCyclopsManagers <T>()
     where T : class, IAuxCyclopsManager
 {
     return(CyclopsManager.GetAllManagers <T>(typeof(T).Name));
 }