public override string GetPopupText()
        {
            var txt = DisplayUtils.MachineDisplay(MachineName);
            var quantumStorageController = StorageIoService.GetStorageController();

            if (quantumStorageController != null && quantumStorageController.IsOperating())
            {
                txt += DisplayUtils.StorageDisplay(quantumStorageController.GetMachineStorage());
            }
            if (ControllerPos[0] == 0 && ControllerPos[1] == 0 && ControllerPos[2] == 0 ||
                quantumStorageController == null)
            {
                txt += "QUANTUM STORAGE CONTROLLER NOT FOUND.\n";
            }

            if (quantumStorageController != null && !quantumStorageController.HasPower())
            {
                txt += "QUANTUM STORAGE CONTROLLER HAS NO POWER.\n";
            }

            if (Input.GetButtonDown("Interact") && UIManager.AllowInteracting)
            {
                UIManager.ForceNGUIUpdate = 0.1f;
                AudioHUDManager.instance.HUDIn();
            }

            return(txt);
        }
        public override string GetPopupText()
        {
            string txt = DisplayUtils.MachineDisplay(MachineName);

            txt += DisplayUtils.PowerDisplay(_machinePower);
            if (IsOperating())
            {
                txt += DisplayUtils.StorageDisplay(_machineStorage);
            }

            if (_anotherControllerDetected)
            {
                txt = "ANOTHER CONTROLLER DETECTED - ONLY ONE CONTROLLER CAN BE PRESENT\n";
            }

            txt += "Q to ";
            txt += _notifications ? "disable" : "enable";
            txt += " notifications.\n";

            if (Input.GetButtonDown("Interact") && (UIManager.AllowInteracting))
            {
                UIManager.ForceNGUIUpdate = 0.1f;
                AudioHUDManager.instance.HUDIn();
            }

            if (Input.GetKeyDown(KeyCode.Q))
            {
                ToggleNotifications();
            }

            return(txt);
        }
        public string getPopupText()
        {
            var    storageController = QuantumOutputPortMachine.StorageIoService.GetStorageController();
            string txt = DisplayUtils.MachineDisplay(QuantumOutputPortMachine.MachineName);

            if ((QuantumOutputPortMachine.ControllerPos[0] == 0 && QuantumOutputPortMachine.ControllerPos[1] == 0 && QuantumOutputPortMachine.ControllerPos[2] == 0) ||
                storageController == null)
            {
                txt += "QUANTUM STORAGE CONTROLLER NOT FOUND.\n";
            }
            if (storageController != null && !storageController.HasPower())
            {
                txt += "QUANTUM STORAGE CONTROLLER HAS NO POWER.\n";
            }
            txt += "\nOutput status: ";
            if (!QuantumOutputPortMachine.Enabled)
            {
                txt += "disabled\n";
            }
            else
            {
                txt += "enabled\n";
            }

            txt += "Output item: ";
            if (QuantumOutputPortMachine.Exemplar != null)
            {
                txt += ItemManager.GetItemName(QuantumOutputPortMachine.Exemplar);
            }
            else
            {
                txt += "none";
            }

            if (Input.GetButtonDown("Interact") && (UIManager.AllowInteracting))
            {
                UIManager.ForceNGUIUpdate = 0.1f;
                AudioHUDManager.instance.HUDIn();
            }

            return(txt);
        }
Exemplo n.º 4
0
 public override string GetPopupText()
 {
     return(DisplayUtils.MachineDisplay(MachineName + " " + _maxCapacity / 1024 + "k"));
 }