Ejemplo n.º 1
0
        public bool StoreScience(ModuleScienceContainer container, ScienceSubject subject, float data)
        {
            if (container.capacity > 0 && container.GetScienceCount() >= container.capacity)
            {
                return(false);
            }

            if (container.GetStoredDataCount() != 0)
            {
                return(false);
            }

            float xmitValue = 0.85f;
            float labBoost  = 0.1f;

            ScienceData new_data = new ScienceData(data, xmitValue, labBoost, subject.id, subject.title);

            if (container.AddData(new_data))
            {
                return(true);
            }


            return(false);
        }
Ejemplo n.º 2
0
        public void DrawOpsWindow()
        {
            bool biomeUnlocked = Utils.IsBiomeUnlocked(this.part.vessel);

            GUILayout.BeginHorizontal();

            drawAbundanceGUI();

            //C&C buttons
            GUILayout.BeginVertical();
            GUILayout.BeginScrollView(new Vector2(0, 0), new GUIStyle(GUI.skin.textArea), GUILayout.Width(300));

            //Biome analysis button
            if (biomeUnlocked == false)
            {
                if (GUILayout.Button("Perform biome analysis"))
                {
                    perfomBiomeAnalysys();
                }
            }

            //Review Data button
            int totalData = scienceContainer.GetStoredDataCount();

            if (totalData > 0)
            {
                if (GUILayout.Button("Review [" + totalData + "] Data"))
                {
                    scienceContainer.ReviewData();
                    swizzler.SwizzleResultsDialog();
                }
            }

            //Research projects
            drawResearchProjectsGUI(biomeUnlocked);

            GUILayout.EndScrollView();
            GUILayout.EndVertical();
            GUILayout.EndHorizontal();

            //Update elapsed time
            if (ModuleIsActive() && currentExperiment != GeologyLabExperiments.None)
            {
                int elapsedTimeIndex = (int)currentExperiment;
                elapsedTimes[elapsedTimeIndex] = elapsedTime;
            }
        }
Ejemplo n.º 3
0
        protected void drawView()
        {
            //Review Data button
            int totalData = scienceContainer.GetStoredDataCount();

            if (GUILayout.Button("Review [" + totalData + "] Data") && totalData > 0)
            {
                scienceContainer.ReviewData();
            }

            //Terrain uplink
            if (GUILayout.Button("T.E.R.R.A.I.N. Uplink"))
            {
                terrainUplinkView.parentView = this.parentView;
                terrainUplinkView.SetVisible(true);
            }
        }