Ejemplo n.º 1
0
        private void initERacksActive()
        {
            if (part.internalModel != null)
            {
                GameObject labIVA = part.internalModel.gameObject.transform.GetChild(0).GetChild(0).gameObject;
                if (labIVA.GetComponent <MeshFilter>().name == "MPL_IVA")
                {
                    msg = labIVA.transform.GetChild(3).gameObject;

                    cfe = msg.transform.GetChild(2).GetChild(0).gameObject;
                    usu = labIVA.transform.GetChild(4).gameObject;

                    cfe.SetActive(!msgSlot.experimentSlotFree());
                    msg.SetActive(msgSlot.isEquipmentInstalled());
                    usu.SetActive(usuSlot.isEquipmentInstalled());

                    NE_Helper.log("init E Racks successfull");
                }
                else
                {
                    NE_Helper.logError("MPL mesh not found");
                }
            }
            else
            {
                NE_Helper.log("init E Racks internal model null");
            }
        }
Ejemplo n.º 2
0
        public override void installExperiment(ExperimentData exp)
        {
            switch (exp.getEquipmentNeeded())
            {
            case EquipmentRacks.MSG:
                if (msgSlot.isEquipmentInstalled() && msgSlot.experimentSlotFree())
                {
                    msgSlot.installExperiment(exp);
                    msgStatus = exp.getAbbreviation();
                    Fields["msgStatus"].guiActive = true;
                }
                else
                {
                    NE_Helper.logError("installExperiment, installed: " + msgSlot.isEquipmentInstalled() + "; free: " + msgSlot.experimentSlotFree());
                }
                break;

            case EquipmentRacks.USU:
                if (usuSlot.isEquipmentInstalled() && usuSlot.experimentSlotFree())
                {
                    usuSlot.installExperiment(exp);
                    usuStatus = exp.getAbbreviation();
                    Fields["usuStatus"].guiActive = true;
                }
                else
                {
                    NE_Helper.logError("installExperiment, installed: " + usuSlot.isEquipmentInstalled() + "; free: " + usuSlot.experimentSlotFree());
                }
                break;
            }
        }
Ejemplo n.º 3
0
        protected override void updateLabStatus()
        {
            switch (MEPlabState)
            {
            case MEPLabStatus.NOT_READY:
                displayStatusMessage(Localizer.GetStringByTag("#ne_Platform_retracted"));
                break;

            case MEPLabStatus.READY:
                Events["DeployPlatform"].guiActive  = true;
                Events["FixArm"].guiActiveUnfocused = false;
                displayStatusMessage(Localizer.GetStringByTag("#ne_Idle"));
                break;

            case MEPLabStatus.RUNNING:
                Fields["labStatus"].guiActive       = false;
                Events["DeployPlatform"].guiActive  = false;
                Events["FixArm"].guiActiveUnfocused = false;
                displayStatusMessage(Localizer.GetStringByTag("#ne_Running"));
                break;

            case MEPLabStatus.ERROR_ON_START:
            case MEPLabStatus.ERROR_ON_STOP:
                Events["DeployPlatform"].guiActive  = false;
                Events["FixArm"].guiActiveUnfocused = true;
                displayStatusMessage(Localizer.GetStringByTag("#ne_Robotic_Arm_Failure"));
                break;
            }

            Fields["experimentName"].guiActive = !exposureSlot.experimentSlotFree();
            experimentName = exposureSlot.getExperiment().getAbbreviation() + ": " + exposureSlot.getExperiment().stateString();

            Events["moveExp"].active = exposureSlot.canExperimentMove(part.vessel);
            if (Events["moveExp"].active)
            {
                Events["moveExp"].guiName = Localizer.Format("#ne_Move_1", exposureSlot.getExperiment().getAbbreviation());
            }

            Events["actionExp"].active = exposureSlot.canActionRun();
            if (Events["actionExp"].active)
            {
                Events["actionExp"].guiName = exposureSlot.getActionString();
            }


            Events["FixArm"].active = Events["FixArm"].guiActiveUnfocused;
        }
Ejemplo n.º 4
0
        public override void installExperiment(ExperimentData exp)
        {
            switch (exp.getEquipmentNeeded())
            {
            case EquipmentRacks.CIR:
                if (cirSlot.isEquipmentInstalled() && cirSlot.experimentSlotFree())
                {
                    cirSlot.installExperiment(exp);
                    cirStatus = exp.getAbbreviation();
                    Fields["cirStatus"].guiActive = true;
                }
                else
                {
                    NE_Helper.logError("installExperiment, installed: " + cirSlot.isEquipmentInstalled() + "; free: " + cirSlot.experimentSlotFree());
                }
                break;

            case EquipmentRacks.FIR:
                if (firSlot.isEquipmentInstalled() && firSlot.experimentSlotFree())
                {
                    firSlot.installExperiment(exp);
                    ffrStatus = exp.getAbbreviation();
                    Fields["ffrStatus"].guiActive = true;
                }
                else
                {
                    NE_Helper.logError("installExperiment, installed: " + firSlot.isEquipmentInstalled() + "; free: " + firSlot.experimentSlotFree());
                }
                break;

            case EquipmentRacks.PRINTER:
                if (printerSlot.isEquipmentInstalled() && printerSlot.experimentSlotFree())
                {
                    printerSlot.installExperiment(exp);
                    prStatus = exp.getAbbreviation();
                    Fields["prStatus"].guiActive = true;
                }
                else
                {
                    NE_Helper.logError("installExperiment, installed: " + printerSlot.isEquipmentInstalled() + "; free: " + printerSlot.experimentSlotFree());
                }
                break;
            }
        }
Ejemplo n.º 5
0
 public override void installExperiment(ExperimentData exp)
 {
     switch (exp.getEquipmentNeeded())
     {
     case EquipmentRacks.KEMINI:
         if (keminiSlot.isEquipmentInstalled() && keminiSlot.experimentSlotFree())
         {
             keminiSlot.installExperiment(exp);
             keminiStatus = exp.getAbbreviation();
             Fields["keminiStatus"].guiActive = true;
             keminiSlot.experimentAction();
         }
         else
         {
             NE_Helper.logError("installExperiment, installed: " + keminiSlot.isEquipmentInstalled() + "; free: " + keminiSlot.experimentSlotFree());
         }
         break;
     }
 }