internal ExperimentData getExperiment() { if (!isEquipmentInstalled() || experimentSlotFree()) { return(ExperimentData.getNullObject()); } else { return(equ.getExperiment()); } }
public override void OnLoad(ConfigNode node) { base.OnLoad(node); NE_Helper.log("ExperimentStorage: OnLoad"); ConfigNode expNode = node.GetNode(ExperimentData.CONFIG_NODE_NAME); if (expNode != null) { setExperiment(ExperimentData.getExperimentDataFromNode(expNode)); } else { setExperiment(ExperimentData.getNullObject()); } }
public void removeExperimentData() { part.mass -= expData.getMass(); setExperiment(ExperimentData.getNullObject()); }
public static ExperimentData getExperiment(string type, float mass) { switch (type) { case "Test": return(new TestExperimentData(mass)); case "CCF": return(new CCF_ExperimentData(mass)); case "CFE": return(new CFE_ExperimentData(mass)); case "FLEX": return(new FLEX_ExperimentData(mass)); case "CFI": return(new CFI_ExperimentData(mass)); case "MIS1": return(new MIS1_ExperimentData(mass)); case "MIS2": return(new MIS2_ExperimentData(mass)); case "MIS3": return(new MIS3_ExperimentData(mass)); case "MEE1": return(new MEE1_ExperimentData(mass)); case "MEE2": return(new MEE2_ExperimentData(mass)); case "CVB": return(new CVB_ExperimentData(mass)); case "PACE": return(new PACE_ExperimentData(mass)); case "KeminiD5": return(new KeminiD5_ExperimentData(mass)); case "KeminiD8": return(new KeminiD8_ExperimentData(mass)); case "KeminiMSC3": return(new KeminiMSC3_ExperimentData(mass)); case "KeminiD7": return(new KeminiD7_ExperimentData(mass)); case "KeminiD10": return(new KeminiD10_ExperimentData(mass)); case "ADUM": return(new ADUM_ExperimentData(mass)); case "SpiU": return(new SpiU_ExperimentData(mass)); default: NE_Helper.logError("Unknow ExperimentData Type"); return(ExperimentData.getNullObject()); } }
public static ExperimentData getExperiment(string type, float mass, float cost) { switch (type) { // // OMS/KLS Experiments // case "Test": return(new TestExperimentData(mass, cost)); case "CCF": return(new CCF_ExperimentData(mass, cost)); case "CFE": return(new CFE_ExperimentData(mass, cost)); case "FLEX": return(new FLEX_ExperimentData(mass, cost)); case "CFI": return(new CFI_ExperimentData(mass, cost)); case "MIS1": return(new MIS1_ExperimentData(mass, cost)); case "MIS2": return(new MIS2_ExperimentData(mass, cost)); case "MIS3": return(new MIS3_ExperimentData(mass, cost)); case "MEE1": return(new MEE1_ExperimentData(mass, cost)); case "MEE2": return(new MEE2_ExperimentData(mass, cost)); case "CVB": return(new CVB_ExperimentData(mass, cost)); case "PACE": return(new PACE_ExperimentData(mass, cost)); case "ADUM": return(new ADUM_ExperimentData(mass, cost)); case "SpiU": return(new SpiU_ExperimentData(mass, cost)); case "": return(ExperimentData.getNullObject()); } // Try to find in Kemini Register for (int idx = 0; idx < KeminiRegister.Count; idx++) { if (KeminiRegister[idx].GetValue("type") == type) { ConfigNode n = KeminiRegister[idx]; return(new KeminiExperimentData( n.GetValue("id"), n.GetValue("type"), n.GetValue("title"), n.GetValue("abbreviation"), mass, cost, NE_Helper.GetValueAsFloat(n, "labTime"))); } } NE_Helper.logError("Unknown ExperimentData Type '" + type + "'."); return(ExperimentData.getNullObject()); }
public void removeExperimentData() { setExperiment(ExperimentData.getNullObject()); }