Ejemplo n.º 1
0
        public override string GetInfo()
        {
            string ret = "";
            string reqLab = "", reqCyclo = "", reqZoo = "";

            if (eurekasRequired > 0)
            {
                ret   += Localizer.Format("#autoLOC_StatSci_EuReq", eurekasRequired);
                reqLab = Localizer.Format("#autoLOC_StatSci_LabReq");
            }
            if (kuarqsRequired > 0)
            {
                if (ret != "")
                {
                    ret += "\n";
                }
                ret += Localizer.Format("#autoLOC_StatSci_KuarkReq", kuarqsRequired);
                double productionRequired = 0.01;
                if (kuarqHalflife > 0)
                {
                    if (ret != "")
                    {
                        ret += "\n";
                    }
                    ret += Localizer.Format("#autoLOC_StatSci_KuarkHalf", kuarqHalflife);
                    productionRequired = kuarqsRequired * (1 - Math.Pow(.5, 1.0 / kuarqHalflife));
                    ret += "\n";
                    ret += Localizer.Format("#autoLOC_StatSci_KuarkProd", productionRequired);
                }
                if (productionRequired > 1)
                {
                    reqCyclo = Localizer.Format("#autoLOC_StatSci_CycReqM", Math.Ceiling(productionRequired));
                }
                else
                {
                    reqCyclo = Localizer.Format("#autoLOC_StatSci_CycReq");
                }
            }
            if (bioproductsRequired > 0)
            {
                if (ret != "")
                {
                    ret += "\n";
                }
                ret += Localizer.Format("#autoLOC_StatSci_BioReq", bioproductsRequired);
                double bioproductDensity = ResourceHelper.getResourceDensity("Bioproducts");
                if (bioproductDensity > 0)
                {
                    ret += Localizer.Format("#autoLOC_StatSci_BioMass", Math.Round(bioproductsRequired * bioproductDensity + part.mass, 2));
                }
                reqZoo = Localizer.Format("#autoLOC_StatSci_ZooReq");
            }
            return(ret + reqLab + reqCyclo + reqZoo + "\n\n" + base.GetInfo());
        }
Ejemplo n.º 2
0
        public override string GetInfo()
        {
            string ret = "";
            string reqLab = "", reqCyclo = "", reqZoo = "";

            if (eurekasRequired > 0)
            {
                ret   += "Eurekas required: " + eurekasRequired;
                reqLab = "\n<color=#DD8800>Requires a TH-NKR Research Lab</color>";
            }
            if (kuarqsRequired > 0)
            {
                if (ret != "")
                {
                    ret += "\n";
                }
                ret += "Kuarqs required: " + kuarqsRequired;
                double productionRequired = 0.01;
                if (kuarqHalflife > 0)
                {
                    if (ret != "")
                    {
                        ret += "\n";
                    }
                    ret += "Kuarq decay halflife: " + kuarqHalflife + " seconds" + "\n";
                    productionRequired = kuarqsRequired * (1 - Math.Pow(.5, 1.0 / kuarqHalflife));
                    ret += String.Format("Production required: {0:F2} kuarq/s", productionRequired);
                }
                if (productionRequired > 1)
                {
                    reqCyclo = "\n<color=#DD8800>Requires " + (Math.Ceiling(productionRequired)) + " D-ZZY Cyclotrons</color>";
                }
                else
                {
                    reqCyclo = "\n<color=#DD8800>Requires a D-ZZY Cyclotron</color>";
                }
            }
            if (bioproductsRequired > 0)
            {
                if (ret != "")
                {
                    ret += "\n";
                }
                ret += "Bioproducts required: " + bioproductsRequired;
                double bioproductDensity = ResourceHelper.getResourceDensity("Bioproducts");
                if (bioproductDensity > 0)
                {
                    ret += String.Format("\nMass when complete: {0:G} t", Math.Round(bioproductsRequired * bioproductDensity + part.mass, 2));
                }
                reqZoo = "\n<color=#DD8800>Requires a F-RRY Zoology Bay</color>";
            }
            return(ret + reqLab + reqCyclo + reqZoo + "\n\n" + base.GetInfo());
        }
        public override string GetInfo()
        {
            string ret = "";
            string reqLab = "", reqCyclo = "", reqZoo = "";

            foreach (var r in requirements)
            {
                if (ret != "")
                {
                    ret += "\n";
                }
                ret += r.Value.name + " " + Localizer.Format("#autoLOC_StatSci_Req", r.Value.amount);
                if (r.Value.name == EUREKAS)
                {
                    reqLab = Localizer.Format("#autoLOC_StatSci_LabReq");
                }
                if (r.Value.name == KUARQS)
                {
                    double productionRequired = 0.01;
                    if (kuarqHalflife > 0)
                    {
                        if (ret != "")
                        {
                            ret += "\n";
                        }
                        ret += Localizer.Format("#autoLOC_StatSci_KuarkHalf", kuarqHalflife);
                        productionRequired = requirements[KUARQS].amount /* kuarqsRequired */ * (1 - Math.Pow(.5, 1.0 / kuarqHalflife));
                        ret += "\n";
                        ret += Localizer.Format("#autoLOC_StatSci_KuarkProd", productionRequired.ToString("F3"));
                    }
                    if (productionRequired > 1)
                    {
                        reqCyclo = Localizer.Format("#autoLOC_StatSci_CycReqM", Math.Ceiling(productionRequired));
                    }
                    else
                    {
                        reqCyclo = Localizer.Format("#autoLOC_StatSci_CycReq");
                    }
                }
                if (r.Value.name == BIOPRODUCTS)
                {
                    double bioproductDensity = ResourceHelper.getResourceDensity(BIOPRODUCTS);
                    if (bioproductDensity > 0)
                    {
                        ret += Localizer.Format("#autoLOC_StatSci_BioMass", Math.Round(requirements[BIOPRODUCTS].amount /* bioproductsRequired */ * bioproductDensity + part.mass, 2));
                    }
                    reqZoo = Localizer.Format("#autoLOC_StatSci_ZooReq");
                }
            }
#if false
            //if (eurekasRequired > 0)
            //{
            //    ret += Localizer.Format("#autoLOC_StatSci_EuReq", eurekasRequired);
            //    reqLab = Localizer.Format("#autoLOC_StatSci_LabReq");
            //}
            if (kuarqsRequired > 0)
            {
                if (ret != "")
                {
                    ret += "\n";
                }
                ret += Localizer.Format("#autoLOC_StatSci_KuarkReq", kuarqsRequired);
                double productionRequired = 0.01;
                if (kuarqHalflife > 0)
                {
                    if (ret != "")
                    {
                        ret += "\n";
                    }
                    ret += Localizer.Format("#autoLOC_StatSci_KuarkHalf", kuarqHalflife);
                    productionRequired = kuarqsRequired * (1 - Math.Pow(.5, 1.0 / kuarqHalflife));
                    ret += "\n";
                    ret += Localizer.Format("#autoLOC_StatSci_KuarkProd", productionRequired);
                }
                if (productionRequired > 1)
                {
                    reqCyclo = Localizer.Format("#autoLOC_StatSci_CycReqM", Math.Ceiling(productionRequired));
                }
                else
                {
                    reqCyclo = Localizer.Format("#autoLOC_StatSci_CycReq");
                }
            }
            if (bioproductsRequired > 0)
            {
                if (ret != "")
                {
                    ret += "\n";
                }
                ret += Localizer.Format("#autoLOC_StatSci_BioReq", bioproductsRequired);
                double bioproductDensity = ResourceHelper.getResourceDensity(BIOPRODUCTS);
                if (bioproductDensity > 0)
                {
                    ret += Localizer.Format("#autoLOC_StatSci_BioMass", Math.Round(bioproductsRequired * bioproductDensity + part.mass, 2));
                }
                reqZoo = Localizer.Format("#autoLOC_StatSci_ZooReq");
            }
#endif
            return(ret + reqLab + reqCyclo + reqZoo + "\n\n" + base.GetInfo());
        }