From 4c09a0530cdb033f262f1e07e622c99951099440 Mon Sep 17 00:00:00 2001 From: Thorwin Vogt Date: Fri, 28 Aug 2020 17:40:21 +0200 Subject: [PATCH] Added letter options to the naming scheme --- SEWorldGenPlugin/Generator/SystemGenerator.cs | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/SEWorldGenPlugin/Generator/SystemGenerator.cs b/SEWorldGenPlugin/Generator/SystemGenerator.cs index f00c2da..5dc214e 100644 --- a/SEWorldGenPlugin/Generator/SystemGenerator.cs +++ b/SEWorldGenPlugin/Generator/SystemGenerator.cs @@ -213,7 +213,11 @@ private void GenerateBelt(long distance, ref int beltIndex) string name = SettingsSession.Static.Settings.GeneratorSettings.BeltSettings.BeltNameFormat .SetProperty("ObjectNumber", beltIndex + 1) - .SetProperty("ObjectNumberGreek", greek_letters[beltIndex++]); + .SetProperty("ObjectNumberGreek", greek_letters[beltIndex]) + .SetProperty("ObjectLetterLower", (char)('a' + (beltIndex % 26))) + .SetProperty("ObjectLetterUpper", (char)('A' + (beltIndex % 26))); + + ++beltIndex; belt.DisplayName = name; belt.Type = SystemObjectType.BELT; @@ -240,10 +244,14 @@ private void GeneratePlanet(int index, long distance, int totalObjects, ref int Vector3D pos = new Vector3D(distance * Math.Sin(angle), distance * Math.Cos(angle), distance * Math.Sin(height)); string name = SettingsSession.Static.Settings.GeneratorSettings.PlanetSettings.PlanetNameFormat - .SetProperty("ObjectNumber", ++planetIndex) + .SetProperty("ObjectNumber", planetIndex + 1) .SetProperty("ObjectNumberGreek", greek_letters[planetIndex]) + .SetProperty("ObjectLetterLower", (char)('a' + (planetIndex % 26))) + .SetProperty("ObjectLetterUpper", (char)('A' + (planetIndex % 26))) .SetProperty("ObjectId", def.Id.SubtypeId.String); + ++planetIndex; + planet.DisplayName = name; planet.Type = SystemObjectType.PLANET; planet.DefName = def.Id.SubtypeId.String; @@ -275,10 +283,11 @@ private MyPlanetMoonItem[] GenerateMoons(float planetSize, float surfaceGravity, string name = SettingsSession.Static.Settings.GeneratorSettings.PlanetSettings.MoonNameFormat .SetProperty("ObjectNumber", i + 1) - .SetProperty("ObjectNumber", i + 1) .SetProperty("ObjectNumberGreek", greek_letters[i]) + .SetProperty("ObjectLetterLower", (char)('a' + (i % 26))) + .SetProperty("ObjectLetterUpper", (char)('A' + (i % 26))) .SetProperty("ObjectId", def.Id.SubtypeId.String) - .SetProperty("PlanetName", planetName); + .SetProperty("MoonPlanetName", planetName); MyPlanetMoonItem item = new MyPlanetMoonItem(); item.Type = SystemObjectType.MOON;