protected override void updateLabStatus() { Fields["labStatus"].guiActive = false; if (keminiSlot.isEquipmentInstalled()) { Events["moveKeminiExp"].active = keminiSlot.canExperimentMove(part.vessel); if (Events["moveKeminiExp"].active) { Events["moveKeminiExp"].guiName = "Move " + keminiSlot.getExperiment().getAbbreviation(); } if (keminiSlot.canActionRun()) { string keminiActionString = keminiSlot.getActionString(); Events["actionKeminiExp"].guiName = keminiActionString; } Events["actionKeminiExp"].active = keminiSlot.canActionRun(); if (!keminiSlot.experimentSlotFree()) { keminiStatus = keminiSlot.getExperiment().getAbbreviation() + ": " + keminiSlot.getExperiment().getStateString(); Fields["keminiStatus"].guiActive = true; } else { Fields["keminiStatus"].guiActive = false; } } }
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; }
public override void installExperiment(ExperimentData exp) { switch (exp.getEquipmentNeeded()) { case EquipmentRacks.KEMINI: if (keminiSlot.isEquipmentInstalled() && keminiSlot.experimentSlotFree()) { keminiSlot.installExperiment(exp); keminiStatus = keminiSlot.getExperiment().getAbbreviation() + ": " + keminiSlot.getExperiment().displayStateString(); Fields["keminiStatus"].guiActive = true; keminiSlot.experimentAction(); } else { NE_Helper.logError("installExperiment, installed: " + keminiSlot.isEquipmentInstalled() + "; free: " + keminiSlot.experimentSlotFree()); } break; } }
protected override void updateLabStatus() { Fields["labStatus"].guiActive = false; if (cir == null || fir == null || printer == null) { initERacksActive(); } if (cirSlot.isEquipmentRunning() || firSlot.isEquipmentRunning() || printerSlot.isEquipmentRunning()) { Events["stopResearch"].active = doResearch; Events["startResearch"].active = !doResearch; } else { if (doResearch) { Events["stopResearch"].active = false; Events["startResearch"].active = false; } else { Events["stopResearch"].active = doResearch; Events["startResearch"].active = !doResearch; } } if (!cirSlot.isEquipmentInstalled()) { Events["installCIR"].active = checkForRackModule(EquipmentRacks.CIR); Fields["cirStatus"].guiActive = false; } else { Events["installCIR"].active = false; Events["moveCIRExp"].active = cirSlot.canExperimentMove(part.vessel); Fields["cirStatus"].guiActive = true; if (Events["moveCIRExp"].active) { Events["moveCIRExp"].guiName = Localizer.Format("#ne_Move_1", cirSlot.getExperiment().getAbbreviation()); } if (cirSlot.canActionRun()) { string cirActionString = cirSlot.getActionString(); Events["actionCIRExp"].guiName = cirActionString; } Events["actionCIRExp"].active = cirSlot.canActionRun(); if (!cirSlot.experimentSlotFree()) { cirStatus = cirSlot.getExperiment().getAbbreviation() + ": " + cirSlot.getExperiment().stateString(); } else { cirStatus = Localizer.GetStringByTag("#ne_No_Experiment"); } } if (!firSlot.isEquipmentInstalled()) { Events["installFIR"].active = checkForRackModule(EquipmentRacks.FIR); Fields["ffrStatus"].guiActive = false; } else { Events["installFIR"].active = false; Events["moveFIRExp"].active = firSlot.canExperimentMove(part.vessel); Fields["ffrStatus"].guiActive = true; if (Events["moveFIRExp"].active) { Events["moveFIRExp"].guiName = Localizer.Format("#ne_Move_1", firSlot.getExperiment().getAbbreviation()); } if (firSlot.canActionRun()) { string ffrActionString = firSlot.getActionString(); Events["actionFIRExp"].guiName = ffrActionString; } Events["actionFIRExp"].active = firSlot.canActionRun(); if (!firSlot.experimentSlotFree()) { ffrStatus = firSlot.getExperiment().getAbbreviation() + ": " + firSlot.getExperiment().stateString(); } else { ffrStatus = Localizer.GetStringByTag("#ne_No_Experiment"); } } if (!printerSlot.isEquipmentInstalled()) { Events["installPrinter"].active = checkForRackModule(EquipmentRacks.PRINTER); Fields["prStatus"].guiActive = false; } else { Events["installPrinter"].active = false; Events["movePRExp"].active = printerSlot.canExperimentMove(part.vessel); Fields["prStatus"].guiActive = true; if (Events["movePRExp"].active) { Events["movePRExp"].guiName = Localizer.Format("#ne_Move_1", printerSlot.getExperiment().getAbbreviation()); } if (printerSlot.canActionRun()) { string prActionString = printerSlot.getActionString(); Events["actionPRExp"].guiName = prActionString; } Events["actionPRExp"].active = printerSlot.canActionRun(); if (!printerSlot.experimentSlotFree()) { prStatus = printerSlot.getExperiment().getAbbreviation() + ": " + printerSlot.getExperiment().stateString(); } else { prStatus = Localizer.GetStringByTag("#ne_No_Experiment"); } } }
protected override void updateLabStatus() { Fields["labStatus"].guiActive = false; msgSlot.updateCheck(); usuSlot.updateCheck(); if (msgSlot.isEquipmentRunning() || usuSlot.isEquipmentRunning()) { Events["stopResearch"].active = doResearch; Events["startResearch"].active = !doResearch; } else { if (doResearch) { Events["stopResearch"].active = false; Events["startResearch"].active = false; } else { Events["stopResearch"].active = doResearch; Events["startResearch"].active = !doResearch; } } if (msg == null) { initERacksActive(); } if (!msgSlot.isEquipmentInstalled()) { Events["installMSG"].active = checkForRackModule(EquipmentRacks.MSG); Fields["msgStatus"].guiActive = false; } else { Events["installMSG"].active = false; Events["moveMSGExp"].active = msgSlot.canExperimentMove(part.vessel); Fields["msgStatus"].guiActive = true; if (Events["moveMSGExp"].active) { Events["moveMSGExp"].guiName = Localizer.Format("#ne_Move_1", msgSlot.getExperiment().getAbbreviation()); } if (msgSlot.canActionRun()) { string cirActionString = msgSlot.getActionString(); Events["actionMSGExp"].guiName = cirActionString; } Events["actionMSGExp"].active = msgSlot.canActionRun(); if (!msgSlot.experimentSlotFree()) { msgStatus = msgSlot.getExperiment().getAbbreviation() + ": " + msgSlot.getExperiment().stateString(); } else { msgStatus = Localizer.GetStringByTag("#ne_No_Experiment"); } } if (!usuSlot.isEquipmentInstalled()) { Events["installUSU"].active = checkForRackModule(EquipmentRacks.USU); Fields["usuStatus"].guiActive = false; } else { Events["installUSU"].active = false; Events["moveUSUExp"].active = usuSlot.canExperimentMove(part.vessel); Fields["usuStatus"].guiActive = true; if (Events["moveUSUExp"].active) { Events["moveUSUExp"].guiName = Localizer.Format("#ne_Move_1", usuSlot.getExperiment().getAbbreviation()); } if (usuSlot.canActionRun()) { string usuActionString = usuSlot.getActionString(); Events["actionUSUExp"].guiName = usuActionString; } Events["actionUSUExp"].active = usuSlot.canActionRun(); if (!usuSlot.experimentSlotFree()) { usuStatus = usuSlot.getExperiment().getAbbreviation() + ": " + usuSlot.getExperiment().stateString(); } else { usuStatus = Localizer.GetStringByTag("#ne_No_Experiment"); } } }