Beispiel #1
0
 private void OnHover(Constructable constructable)
 {
     if (isActive)
     {
         HandReticle main = HandReticle.main;
         if (constructable.constructed)
         {
             main.SetText(HandReticle.TextType.Hand, this.deconstructText, false);
         }
         else
         {
             StringBuilder stringBuilder = new StringBuilder();
             stringBuilder.AppendLine(this.constructText);
             foreach (KeyValuePair <TechType, int> keyValuePair in constructable.GetRemainingResources())
             {
                 TechType key   = keyValuePair.Key;
                 string   text  = Language.main.Get(key);
                 int      value = keyValuePair.Value;
                 if (value > 1)
                 {
                     stringBuilder.AppendLine(Language.main.GetFormat <string, int>("RequireMultipleFormat", text, value));
                 }
                 else
                 {
                     stringBuilder.AppendLine(text);
                 }
             }
             main.SetText(HandReticle.TextType.Hand, stringBuilder.ToString(), false);
             main.SetProgress(constructable.amount);
             main.SetIcon(HandReticle.IconType.Progress, 1.5f);
         }
     }
 }
Beispiel #2
0
        public void OnHandHover(GUIHand hand)
        {
            HandReticle main = HandReticle.main;

            main.SetText(HandReticle.TextType.Hand, "OpenStorage", true, GameInput.Button.LeftHand);
            //main.SetText(HandReticle.TextType.HandSubscript, string.Empty, false, GameInput.Button.None);
            main.SetText(HandReticle.TextType.HandSubscript, IsEmpty() ? "Empty" : string.Empty, true, GameInput.Button.None);
            HandReticle.main.SetIcon(HandReticle.IconType.Hand, 1f);
        }
        // Completely replaces the original OnHover method in the BaseBioReactor
        internal void OnHover()
        {
            HandReticle main = HandReticle.main;

            string text1 = Language.main.GetFormat("UseBaseBioReactor", this.CurrentPower, this.MaxPowerText);

#if SUBNAUTICA
            main.SetInteractText(text1, "Tooltip_UseBaseBioReactor", false, true, HandReticle.Hand.Right);
#elif BELOWZERO
            main.SetText(HandReticle.TextType.Hand, text1, false, GameInput.Button.LeftHand);
            main.SetText(HandReticle.TextType.HandSubscript, "Tooltip_UseBaseBioReactor", true);
#endif
            main.SetIcon(HandReticle.IconType.Hand, 1f);
        }
        public void OnHandHover(GUIHand hand)
        {
            if (_mono == null)
            {
                return;
            }

            var         state = _mono.PowerManager.GetPowerState();
            HandReticle main  = HandReticle.main;

#if DEBUG
            main.SetInteractText(SeaCookerBuildable.NoPowerAvailable());
#endif
            //QuickLogger.Debug($"PowerState: {state}");

            if (state == FCSPowerStates.Unpowered)
            {
                main.SetIcon(HandReticle.IconType.Default);
#if SUBNAUTICA
                main.SetInteractText(SeaCookerBuildable.NoPowerAvailable());
#elif BELOWZERO
                main.SetText(HandReticle.TextType.Hand, SeaCookerBuildable.NoPowerAvailable(), false);
#endif
            }
        }
Beispiel #5
0
        public void OnHandHover(HandTargetEventData data)
        {
            HandReticle main = HandReticle.main;

            main.SetIcon(HandReticle.IconType.Hand, 1f);
            main.SetText(HandReticle.TextType.Hand, labelInteract, true, GameInput.Button.LeftHand);
        }
Beispiel #6
0
 private void OnHover(BaseDeconstructable deconstructable)
 {
     if (isActive)
     {
         HandReticle main = HandReticle.main;
         main.SetText(HandReticle.TextType.Hand, this.deconstructText, false);
     }
 }
Beispiel #7
0
 private bool TryDisplayNoPowerTooltip()
 {
     if (this.energyMixin.GetPower() <= 0f)
     {
         HandReticle main = HandReticle.main;
         main.SetText(HandReticle.TextType.Hand, this.noPowerText, false);
         main.SetIcon(HandReticle.IconType.Default, 1f);
         return(true);
     }
     return(false);
 }
        public void OnHandHover(GUIHand hand)
        {
            HandReticle main = HandReticle.main;

#if SUBNAUTICA
            main.SetInteractText(FCSDeepDrillerBuildable.OnBatteryHoverText());
#elif BELOWZERO
            main.SetText(HandReticle.TextType.Hand, FCSDeepDrillerBuildable.OnBatteryHoverText(), false);
#endif
            main.SetIcon(HandReticle.IconType.Hand, 1f);
        }
        public void OnHandHover(GUIHand hand)
        {
            HandReticle main = HandReticle.main;

#if SUBNAUTICA
            main.SetInteractText(AIPowerCellSocketBuildable.OnHover());
#elif BELOWZERO
            main.SetText(HandReticle.TextType.Hand, AIPowerCellSocketBuildable.OnHover(), false);
#endif
            main.SetIcon(HandReticle.IconType.Hand, 1f);
        }
        public void OnHandHover(GUIHand hand)
        {
            HandReticle main = HandReticle.main;

#if SUBNAUTICA
            main.SetInteractText("Open MedBay Storage.");
#elif BELOWZERO
            main.SetText(HandReticle.TextType.Hand, "Open MedBay Storage.", false);
#endif
            main.SetIcon(HandReticle.IconType.Hand, 1f);
        }
Beispiel #11
0
        public void OnHandHover(GUIHand hand)
        {
            HandReticle main = HandReticle.main;

            main.SetIcon(HandReticle.IconType.Default);
#if SUBNAUTICA
            main.SetInteractText(_mono.PowerManager.GetSolarPowerData(), false, HandReticle.Hand.None);
#elif BELOWZERO
            main.SetText(HandReticle.TextType.Hand, _mono.PowerManager.GetSolarPowerData(), false);
#endif
        }
        public void OnHandHover(GUIHand hand)
        {
            HandReticle main = HandReticle.main;

#if SUBNAUTICA
            main.SetInteractText("Climb Ladder");
#elif BELOWZERO
            main.SetText(HandReticle.TextType.Hand, "Climb Ladder", false);
#endif
            main.SetIcon(HandReticle.IconType.Hand, 1f);
        }
        private void OnHover(BaseDeconstructable deconstructable)
        {
            if (isActive)
            {
                HandReticle main = HandReticle.main;
#if SN1
                main.SetInteractText(deconstructable.Name, deconstructText);
#elif BZ
                main.SetText(HandReticle.TextType.Hand, this.deconstructText, false);
#endif
            }
        }
        public void OnHandHover(GUIHand hand)
        {
            HandReticle main  = HandReticle.main;
            var         state = PowerManager?.GetPowerState() == FCSPowerStates.Powered ? "On" : "Off";

#if SUBNAUTICA
            main.SetInteractTextRaw(Manager?.GetBaseName(), $"{AuxPatchers.Antenna()}: {state} || {AuxPatchers.PowerUsage()}: {PowerManager?.GetPowerUsage():F1}");
#elif BELOWZERO
            main.SetText(HandReticle.TextType.Info, Manager.GetBaseName(), false);
#endif
            main.SetIcon(HandReticle.IconType.Info, 1f);
        }
        private bool TryDisplayNoPowerTooltip()
        {
            if (this.EnergyMixin.charge <= 0f)
            {
                HandReticle main = HandReticle.main;
#if SN1
                main.SetInteractText(noPowerText, false, HandReticle.Hand.None);
#elif BZ
                main.SetText(HandReticle.TextType.Hand, this.noPowerText, true);
#endif
                main.SetIcon(HandReticle.IconType.Default, 1f);
                return(true);
            }
            return(false);
        }
        public void OnHandHover(GUIHand hand)
        {
            if (_mono == null)
            {
                return;
            }

            if (TeleportManager.IsTeleporting())
            {
                return;
            }

            HandReticle main = HandReticle.main;

            main.SetIcon(HandReticle.IconType.Hand);

#if SUBNAUTICA
            if (!IsDoorOpen())
            {
                main.SetInteractText(QuantumTeleporterBuildable.OpenDoor());
            }
            else
            {
                main.SetInteractText(QuantumTeleporterBuildable.CloseDoor());
            }
#elif BELOWZERO
            if (!IsDoorOpen())
            {
                main.SetText(HandReticle.TextType.Hand, QuantumTeleporterBuildable.OpenDoor(), false);
            }
            else
            {
                main.SetText(HandReticle.TextType.Hand, QuantumTeleporterBuildable.CloseDoor(), false);
            }
#endif
        }