예제 #1
0
 internal void AddBaseUnit(OxStationController unit)
 {
     if (!BaseUnits.Contains(unit))
     {
         BaseUnits.Add(unit);
         QuickLogger.Debug($"Add {Mod.FriendlyName} Unit to Base List : {unit.GetPrefabIDString()}", true);
         QuickLogger.Debug($"{Mod.FriendlyName} has been connected to base list Count {BaseUnits.Count}", true);
     }
 }
예제 #2
0
 internal static void RemoveBaseUnit(OxStationController unit)
 {
     foreach (BaseManager manager in Managers)
     {
         if (!manager.BaseUnits.Contains(unit))
         {
             continue;
         }
         manager.BaseUnits.Remove(unit);
         QuickLogger.Debug($"Removed Base Unit : {unit.GetPrefabIDString()}", true);
     }
 }
        internal void UpdateDisplay()
        {
            if (_station == null)
            {
                if (Tag != null)
                {
                    _station = (OxStationController)Tag;
                }
            }

            if (_station == null || OxstationHealth == null || OxstationOxygen == null)
            {
                return;
            }
            OxstationHealth.fillAmount = _station.HealthManager.GetHealthPercentage();
            OxstationOxygen.fillAmount = _station.OxygenManager.GetO2LevelPercentageFloat();
            ToggleText();
        }
        internal void Initialize(OxStationController mono)
        {
            QuickLogger.Debug("Health Initialize");
            _mono            = mono;
            _liveMixin       = mono.gameObject.AddComponent <LiveMixin>();
            _damagePerSecond = DayNight / DamagePerDay;

            if (_liveMixin != null)
            {
                if (_liveMixin.data == null)
                {
                    QuickLogger.Debug($"Creating Data");
                    _liveMixin.data = CustomLiveMixinData.Get();
                    QuickLogger.Debug($"Created Data");
                }
            }
            else
            {
                QuickLogger.Error($"LiveMixing not found!");
            }
        }
        internal void Setup(OxStationController mono)
        {
            _mono = mono;

            mono.HealthManager.OnDamaged  += OnDamaged;
            mono.HealthManager.OnRepaired += OnRepaired;
            _isScreenOn = Animator.StringToHash("IsScreenOn");

            if (FindAllComponents())
            {
                StartCoroutine(CompleteSetup());
            }
            else
            {
                QuickLogger.Error("// ============== Error getting all Components ============== //");
                return;
            }

            StartCoroutine(CompleteSetup());

            InvokeRepeating(nameof(UpdateScreen), 0, 0.5f);
        }
예제 #6
0
 // Token: 0x06000088 RID: 136 RVA: 0x000039FA File Offset: 0x00001BFA
 private static void Prefix(Beacon __instance)
 {
     OxStationController.TryDetachBeacon(__instance);
 }
 /// <summary>
 /// Setup the monobehaviour for operation
 /// </summary>
 /// <param name="mono"></param>
 internal void Initialize(OxStationController mono)
 {
     _mono = mono;
     FillTank();
     _tankCapacity = QPatch.Configuration.TankCapacity;
 }
 internal void Initialize(OxStationController mono)
 {
     _mono = mono;
 }