private IEnumerator TrackNewSeabreezeCoroutine(FCSConnectableDevice obj) { yield return(new WaitForEndOfFrame()); GameObject newSeaBase = obj?.gameObject?.transform?.parent?.gameObject; QuickLogger.Debug($"SeaBase Base Found in Track {newSeaBase?.name}"); QuickLogger.Debug($"Cooker Base Found in Track {_habitat?.name}"); if (newSeaBase != null && newSeaBase == _habitat) { QuickLogger.Debug("Adding Seabreeze"); SeaBreezes.Add(obj.GetPrefabIDString(), obj); DisplayManager.UpdateSeaBreezes(); QuickLogger.Debug("Added Seabreeze"); } }
private void GetSeaBreezes() { //Clear the list SeaBreezes.Clear(); //Check if there is a base connected if (_habitat != null || Mod.SeabeezeTechType() != TechType.None) { var connectableDevices = _habitat.GetComponentsInChildren <FCSConnectableDevice>().ToList(); foreach (var device in connectableDevices) { if (device.GetTechType() == Mod.SeabeezeTechType()) { SeaBreezes.Add(device.GetPrefabIDString(), device); } } } }