protected override string RequirementText()
        {
            string facilityName = Regex.Replace(facility.ToString(), @"([A-Z]+?(?=[A-Z][^A-Z])|\B[A-Z]+?(?=[^A-Z]))", " $1");

            if (facility == SpaceCenterFacility.Administration || facility == SpaceCenterFacility.MissionControl || facility == SpaceCenterFacility.ResearchAndDevelopment)
            {
                facilityName += " Building";
            }

            string output = "The " + facilityName + " must " + (invertRequirement ? "not " : "") + "be ";

            if (minLevel == maxLevel)
            {
                output += "at level " + NumericValueExpressionParser <int> .PrintNumber(minLevel);
            }
            else if (minLevel > 1)
            {
                output += "at least at level " + NumericValueExpressionParser <int> .PrintNumber(minLevel);
            }
            else
            {
                output += "at most at level " + NumericValueExpressionParser <int> .PrintNumber(maxLevel);
            }

            return(output);
        }
Пример #2
0
        protected override string RequirementText()
        {
            string facilityName = Regex.Replace(facility.ToString(), @"([A-Z]+?(?=[A-Z][^A-Z])|\B[A-Z]+?(?=[^A-Z]))", " $1");

            string output = "The " + facilityName + " must " + (invertRequirement ? "not " : "") + "be ";

            if (minLevel == maxLevel)
            {
                output += "at level " + NumericValueExpressionParser <int> .PrintNumber(minLevel);
            }
            else if (minLevel >= 1)
            {
                output += "at least at level " + NumericValueExpressionParser <int> .PrintNumber(minLevel);
            }
            else
            {
                output += "at most at level " + NumericValueExpressionParser <int> .PrintNumber(maxLevel);
            }

            return(output);
        }
Пример #3
0
        public static List <UpgradeableFacility> GetFacilityReferencesByType(SpaceCenterFacility facilityType)
        {
            string internalId = ScenarioUpgradeableFacilities.SlashSanitize(facilityType.ToString());

            return(GetFacilityReferencesById(internalId));
        }
Пример #4
0
 public void Save(ConfigNode node)
 {
     sFacilityType = facilityType?.ToString();
     ConfigNode.CreateConfigFromObject(this, node);
 }