Exemplo n.º 1
0
        public string UWP(Planet.WorldType type = Planet.WorldType.NORMAL, double diameter = 0)
        {
            var builder = new StringBuilder();

            switch (type)
            {
            case Planet.WorldType.LGG:
                builder.AppendFormat("LGG - diameter {0} km", diameter.ToString("F"));
                break;

            case Planet.WorldType.SGG:
                builder.AppendFormat("SGG - diameter {0} km", diameter.ToString("F"));
                break;

            case Planet.WorldType.SMALL:
                builder.AppendFormat("{0}-S{1}{2}{3}-{4}", Starport, Atmosphere.ToString(), Hydro.ToString(), SocialUWP(), TechLevel.ToString());
                break;

            case Planet.WorldType.RING:
                builder.AppendFormat("{0}-R00{1}-{2}", Starport, SocialUWP(), TechLevel.ToString());
                break;

            case Planet.WorldType.NORMAL:
            case Planet.WorldType.PLANETOID:
                builder.AppendFormat("{0}-{1}{2}-{3}", Starport, PhysicalUWP(), SocialUWP(), TechLevel.ToString());
                break;

            case Planet.WorldType.STAR:
                builder.Append(Languages.CompanionStar);
                break;
            }
            return(builder.ToString());
        }
Exemplo n.º 2
0
 public int Count(Planet.WorldType worldType)
 {
     if (World != null)
     {
         if (World.PlanetType == worldType)
         {
             return(1);
         }
     }
     return(0);
 }
Exemplo n.º 3
0
        public int Count(Planet.WorldType worldType)
        {
            var c = 0;

            foreach (var orbit in Orbits)
            {
                c += orbit.Count(worldType);
            }
            foreach (var companion in Companions)
            {
                c += companion.Count(worldType);
            }
            return(c);
        }
Exemplo n.º 4
0
        public string DisplayString(Planet.WorldType type = Planet.WorldType.NORMAL, double diameter = 0)
        {
            var builder = new StringBuilder();

            builder.AppendFormat("{0}\t{1}\t{2}", UWP(), Bases, Remarks);
            if (type != Planet.WorldType.LGG && type != Planet.WorldType.SGG && type != Planet.WorldType.STAR)
            {
                if (PopMult > 0)
                {
                    builder.AppendFormat("\t{0}", PopMult);
                }
            }
            return(builder.ToString());
        }