Skip to content

Commit

Permalink
Added letter options to the naming scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
thorwin99 committed Aug 28, 2020
1 parent 0fe9bc2 commit 4c09a05
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions SEWorldGenPlugin/Generator/SystemGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 4c09a05

Please sign in to comment.