コード例 #1
0
        private void AlertedNewTurbineDestroyed(JetStreamT242Controller obj)
        {
            if (obj != null)
            {
                Log.Info("Removed Sub");
                Turbines.Remove(obj.ID);
                Log.Info("Removed Turbine");

                _marineMonitorDisplay.ItemModified <string>(null);
            }
        }
コード例 #2
0
        private IEnumerator TrackNewTurbineCoroutine(JetStreamT242Controller obj)
        {
            yield return(new WaitForEndOfFrame());

            GameObject newSeaBase = obj?.gameObject?.transform?.parent?.gameObject;

            if (newSeaBase != null && newSeaBase == _seaBase)
            {
                Turbines.Add(obj.ID, obj);
                _marineMonitorDisplay.ItemModified <string>(null);
            }
        }
コード例 #3
0
 private void AlertedNewTurbineDestroyed(AIJetStreamT242Controller obj)
 {
     QuickLogger.Debug("Attempting to remove turbine", true);
     if (obj != null)
     {
         QuickLogger.Debug("OBJ Not NULL", true);
         Turbines?.Remove(obj.GetPrefabId());
         QuickLogger.Debug("Past Turbine", true);
         _aiMarineMonitorDisplay?.ItemModified(TechType.None);
         QuickLogger.Debug("Removed Turbine");
     }
 }
コード例 #4
0
        private IEnumerator TrackNewTurbineCoroutine(AIJetStreamT242Controller obj)
        {
            // We yield to the end of the frame as we need the parent/children tree to update.
            yield return(new WaitForEndOfFrame());

            GameObject newSeaBase = obj?.gameObject?.transform?.parent?.gameObject;

            QuickLogger.Debug("Attempting to add turbine", true);
            if (newSeaBase != null && newSeaBase == _seaBase)
            {
                Turbines.Add(obj.GetPrefabId(), obj);
                QuickLogger.Debug($"Turbine Count: {Turbines.Count}", true);
                _aiMarineMonitorDisplay.ItemModified(TechType.None);
            }
        }
コード例 #5
0
        /// <summary>
        /// Gets all the turbines in the base
        /// </summary>
        private void GetTurbines()
        {
            //Clear the list
            Turbines.Clear();

            //Check if there is a base connected
            if (_seaBase != null)
            {
                var jetStreamT242S = _seaBase.GetComponentsInChildren <JetStreamT242Controller>().ToList();

                foreach (var turbine in jetStreamT242S)
                {
                    Turbines.Add(turbine.ID, turbine);
                }
            }
        }
コード例 #6
0
 private bool Filter(Turbines turbines)
 {
     return(turbines.Availability > 90.0 && turbines.Production > 1300);
 }