private void Start() { if (!_coroutineStarted) { base.InvokeRepeating(nameof(UpdateDisplay), DelayedStartTime * 3f, RepeatingUpdateInterval); } DisplayLanguagePatching.AdditionPatching(); if (FindAllComponents() == false) { QuickLogger.Error("// ============== Error getting all Components ============== //"); return; } _animatorController = this.transform.GetComponent <CubeGeneratorAnimator>(); if (_animatorController == null) { QuickLogger.Error("Animator component not found on the GameObject."); } _mono = this.transform.GetComponent <CubeGeneratorMono>(); if (_mono == null) { QuickLogger.Error("CubeGeneratorMono component not found on the GameObject."); } _initialized = true; UpdateSpeedModeText(); BootScreen(); }
public void OnHandHover(GUIHand hand) { #if SUBNAUTICA if (!IsOperational()) { HandReticle.main.SetInteractText(DisplayLanguagePatching.NotOperational(), false); HandReticle.main.SetIcon(HandReticle.IconType.Default); } else { HandReticle.main.SetInteractText(GetTurbinePowerData(), false); HandReticle.main.SetIcon(HandReticle.IconType.Default); } #elif BELOWZERO if (!IsOperational()) { HandReticle.main.SetText(HandReticle.TextType.Hand, DisplayLanguagePatching.NotOperational(), false); HandReticle.main.SetIcon(HandReticle.IconType.Default); } else { HandReticle.main.SetText(HandReticle.TextType.Hand, GetTurbinePowerData(), false); HandReticle.main.SetIcon(HandReticle.IconType.Default); } #endif }
internal void Setup(AlterraShippingTarget mono) { if (!_coroutineStarted) { base.InvokeRepeating(nameof(UpdateDisplay), DelayedStartTime * 3f, RepeatingUpdateInterval); } DisplayLanguagePatching.AdditionPatching(); _mono = mono; if (FindAllComponents() == false) { QuickLogger.Error("// ============== Error getting all Components ============== //"); return; } if (_mono == null) { QuickLogger.Error("CubeGeneratorMono component not found on the GameObject."); return; } if (_mono.GetTransferHandler() == null) { QuickLogger.Error($"Transfer Handler is returning null."); return; } _animatorController = _mono.AnimatorController; if (_mono != null) { _mono.OnReceivingTransfer += OnReceivingTransfer; } if (_mono != null) { _mono.OnTimerChanged += OnTimerChanged; } if (_mono != null) { _mono.OnItemSent += OnItemSent; } _initialized = true; _serializedColors = ColorList.Colors; CheckCurrentPage(); DrawPage(1); DrawColorPage(1); ShippingTargetManager.GlobalChanged += GlobalChanged; InvokeRepeating("UpdateStatus", 1f, 0.5f); }
public void OnConstructedChanged(bool constructed) { QuickLogger.Debug($"Constructed - {constructed}"); if (IsBeingDeleted) { return; } if (constructed) { _seaBase = gameObject?.transform?.parent?.gameObject; if (isActiveAndEnabled) { if (IsOperational()) { if (!IsInitialized) { Initialize(); } if (_display != null) { _display.Setup(this); _runStartUpOnEnable = false; } _currentBiome = BiomeManager.GetBiome(); RotateToMag(); SetCurrentRotation(); QuickLogger.Debug($"Turbine Constructed Rotation Set {_rotor.transform.rotation.ToString()} ", true); } else { QuickLogger.Message(DisplayLanguagePatching.NotOperational(), true); } } else { _runStartUpOnEnable = true; } } }