private void AlertedFCSConnectableDestroyed(FCSConnectableDevice obj)
        {
            if (obj == null || obj.GetPrefabIDString() == null)
            {
                return;
            }

            QuickLogger.Debug("OBJ Not NULL", true);
            FCSConnectables.Remove(obj.GetPrefabIDString());
            QuickLogger.Debug("Removed FCSConnectable");
        }
Exemplo n.º 2
0
        private void AlertedSeaBreezeDestroyed(FCSConnectableDevice obj)
        {
            if (obj == null || obj.GetPrefabIDString() == null)
            {
                return;
            }

            QuickLogger.Debug("OBJ Not NULL", true);
            SeaBreezes.Remove(obj.GetPrefabIDString());
            QuickLogger.Debug("Removed Seabreeze");
            DisplayManager.UpdateSeaBreezes();
        }
Exemplo n.º 3
0
        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 TrackNewFCSConnectable(FCSConnectableDevice obj)
        {
            GameObject newSeaBase         = obj?.gameObject?.transform?.parent?.gameObject;
            var        fcsConnectableBase = BaseManager.FindManager(newSeaBase?.GetComponentInChildren <PrefabIdentifier>().Id);

            QuickLogger.Debug($"SeaBase Base Found in Track {newSeaBase?.name}");
            QuickLogger.Debug($"Terminal Base Found in Track {Habitat?.name}");

            if (newSeaBase != null && fcsConnectableBase?.Habitat == Habitat)
            {
                QuickLogger.Debug("Subscribing to OnContainerUpdate");
                obj.GetStorage().OnContainerUpdate += OnFCSConnectableContainerUpdate;
                QuickLogger.Debug("Adding FCSConnectable");
                FCSConnectables.Add(obj.GetPrefabIDString(), obj);
                QuickLogger.Debug("Added FCSConnectable");
            }
        }
        private void TrackNewFCSConnectable(FCSConnectableDevice obj)
        {
            QuickLogger.Info("===========================================");

            QuickLogger.Info("1");
            if (obj == null)
            {
                return;
            }
            QuickLogger.Info("2");

            SubRoot newSeaBase = obj.GetComponentInParent <SubRoot>(); //obj?.gameObject?.transform?.parent?.gameObject;

            QuickLogger.Info("3");

            var fcsConnectableBase = FindManager(newSeaBase?.GetComponentInChildren <PrefabIdentifier>().Id);

            QuickLogger.Info("4");

#if DEBUG
            QuickLogger.Debug($"FCSConnectable Base Found: {newSeaBase?.name}", true);
            QuickLogger.Debug($"FCSConnectable found in base: {Habitat?.name}", true);
#endif

            if (fcsConnectableBase == null || Habitat)
            {
                return;
            }

            if (fcsConnectableBase.Habitat == Habitat)
            {
                QuickLogger.Debug("Subscribing to OnContainerUpdate");
                obj.GetStorage().OnContainerUpdate += OnFCSConnectableContainerUpdate;
                QuickLogger.Info("5");
                QuickLogger.Debug("Adding FCSConnectable");
                FCSConnectables.Add(obj.GetPrefabIDString(), obj);
                QuickLogger.Debug("Added FCSConnectable");
                QuickLogger.Info("6");
            }

            QuickLogger.Info("===========================================");
        }
Exemplo n.º 6
0
 public void SetCurrentSeaBreeze(FCSConnectableDevice sb)
 {
     SelectedSeaBreeze   = sb;
     SelectedSeaBreezeID = sb.GetPrefabIDString();
 }