Exemplo n.º 1
0
        protected override string RequirementText()
        {
            string techStr = "";

            for (int i = 0; i < techs.Count; i++)
            {
                if (i != 0)
                {
                    if (i == techs.Count - 1)
                    {
                        techStr += " and ";
                    }
                    else
                    {
                        techStr += ", ";
                    }
                }

                techStr += Tech.GetTech(techs[i]).title;
            }

            return("Must " + (invertRequirement ? "not " : "") + " be able to research (or have already researched) " + techStr);
        }
Exemplo n.º 2
0
        protected override string RequirementText()
        {
            // Techs
            if (techs.Count > 0)
            {
                return(Localizer.Format(invertRequirement ? "#cc.req.TechResearched.tech.x" : "#cc.req.TechResearched.tech",
                                        LocalizationUtil.LocalizeList <string>(invertRequirement ? LocalizationUtil.Conjunction.AND : LocalizationUtil.Conjunction.OR, techs, x => { Tech t = Tech.GetTech(x); return t != null ? t.title : x; })));
            }

            // Part module
            if (partModules.Count > 0)
            {
                return(Localizer.Format(invertRequirement ? "#cc.req.TechResearched.part.x" : "#cc.req.TechResearched.part",
                                        LocalizationUtil.LocalizeList <string>(invertRequirement ? LocalizationUtil.Conjunction.AND : LocalizationUtil.Conjunction.OR, partModules, x => Parameters.PartValidation.ModuleName(x))));
            }

            // Part module type
            return(Localizer.Format(invertRequirement ? "#cc.req.TechResearched.part.x" : "#cc.req.TechResearched.part",
                                    LocalizationUtil.LocalizeList <string>(invertRequirement ? LocalizationUtil.Conjunction.AND : LocalizationUtil.Conjunction.OR, partModuleTypes, x => Parameters.PartValidation.ModuleTypeName(x))));
        }
Exemplo n.º 3
0
        protected override string RequirementText()
        {
            // Techs
            string techStr = "";

            for (int i = 0; i < techs.Count; i++)
            {
                if (i != 0)
                {
                    if (i == techs.Count - 1)
                    {
                        techStr += " and ";
                    }
                    else
                    {
                        techStr += ", ";
                    }
                }

                techStr += Tech.GetTech(techs[i]).title;
            }
            if (techs.Count > 0)
            {
                techStr = "have researched " + techStr;
            }

            // Part module
            string pmStr = "";

            for (int i = 0; i < partModules.Count; i++)
            {
                if (i != 0)
                {
                    if (i == partModules.Count - 1)
                    {
                        pmStr += " and ";
                    }
                    else
                    {
                        pmStr += ", ";
                    }
                }

                pmStr += partModules[i];
            }
            if (partModules.Count > 0)
            {
                if (techs.Count > 0)
                {
                    techStr += " and";
                }
                pmStr = " have researched tech for " + pmStr;
            }

            // Part module type
            string pmtStr = "";

            for (int i = 0; i < partModuleTypes.Count; i++)
            {
                if (i != 0)
                {
                    if (i == partModuleTypes.Count - 1)
                    {
                        pmtStr += " and ";
                    }
                    else
                    {
                        pmtStr += ", ";
                    }
                }

                pmtStr += partModuleTypes[i];
            }
            if (partModuleTypes.Count > 0)
            {
                if (techs.Count > 0 || partModules.Count > 0)
                {
                    pmStr += " and";
                }
                pmtStr = " have researched tech for " + pmtStr;
            }

            return("Must " + (invertRequirement ? "not " : "") + techStr + pmStr + pmtStr);
        }
        protected override string RequirementText()
        {
            string techStr = LocalizationUtil.LocalizeList <string>(invertRequirement ? LocalizationUtil.Conjunction.OR : LocalizationUtil.Conjunction.AND, techs, t => Tech.GetTech(t).title);

            return(Localizer.Format(invertRequirement ? "#cc.req.CanResearchTech.x" : "#cc.req.CanResearchTech", techStr));
        }