Example #1
0
        public string FormatBodyString(string input, CelestialBody body)
        {
            string result = input.
                            Replace("$body", body.name).
                            Replace("$theBody", body.CleanDisplayName());

            if (result.Contains("$theBodies"))
            {
                result = result.Replace("$theBodies", CelestialBodyUtil.BodyList(Enumerable.Repeat(body, 1).Union(body.orbitingBodies), "and"));
            }
            if (result.Contains("$childBodies"))
            {
                result = result.Replace("$childBodies", CelestialBodyUtil.BodyList(body.orbitingBodies, "and"));
            }
            if (result.Contains("$childBodyCount"))
            {
                result = result.Replace("$childBodyCount", StringUtil.IntegerToRoman(body.orbitingBodies.Count()));
            }

            return(result);
        }
Example #2
0
 public string RequirementText()
 {
     return("Must " + (invert ? "not " : "") + "have " + Verbed() + " " + CelestialBodyUtil.BodyList(bodies, "or"));
 }
 public string RequirementText()
 {
     return("Must " + (invert ? "not " : "") + "have researched " + CelestialBodyUtil.BodyList(bodies, "and"));
 }
Example #4
0
 protected override string GetDescription()
 {
     return("Increases likelihood of receiving contracts for " + CelestialBodyUtil.BodyList(bodies, "and") + ".");
 }