From 0fe9bc2b604b6536c326de15e507f5fb2e65bab9 Mon Sep 17 00:00:00 2001 From: Thorwin Vogt Date: Fri, 28 Aug 2020 17:22:26 +0200 Subject: [PATCH] Fixed a bug that caused moons using the planet naming scheme Fixed a missing implementation of the belts naming scheme Removed parameters from belt naming scheme that did not make sense for it to have Added parameter to moon naming scheme that allows the use of the planet name #50 --- SEWorldGenPlugin/Generator/SystemGenerator.cs | 14 ++++++++++---- SEWorldGenPlugin/Properties/AssemblyInfo.cs | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/SEWorldGenPlugin/Generator/SystemGenerator.cs b/SEWorldGenPlugin/Generator/SystemGenerator.cs index 813e694..f00c2da 100644 --- a/SEWorldGenPlugin/Generator/SystemGenerator.cs +++ b/SEWorldGenPlugin/Generator/SystemGenerator.cs @@ -211,7 +211,11 @@ private void GenerateBelt(long distance, ref int beltIndex) { MySystemBeltItem belt = new MySystemBeltItem(); - belt.DisplayName = "Belt " + greek_letters[beltIndex++ % greek_letters.Length]; + string name = SettingsSession.Static.Settings.GeneratorSettings.BeltSettings.BeltNameFormat + .SetProperty("ObjectNumber", beltIndex + 1) + .SetProperty("ObjectNumberGreek", greek_letters[beltIndex++]); + + belt.DisplayName = name; belt.Type = SystemObjectType.BELT; belt.Height = MyRandom.Instance.Next(m_settings.BeltSettings.MinBeltHeight, m_settings.BeltSettings.MaxBeltHeight); belt.Radius = distance; @@ -269,10 +273,12 @@ private MyPlanetMoonItem[] GenerateMoons(float planetSize, float surfaceGravity, if (dist + distance > m_settings.WorldSize && m_settings.WorldSize > 0) return moons; - string name = SettingsSession.Static.Settings.GeneratorSettings.PlanetSettings.PlanetNameFormat - .SetProperty("ObjectNumber", i) + string name = SettingsSession.Static.Settings.GeneratorSettings.PlanetSettings.MoonNameFormat + .SetProperty("ObjectNumber", i + 1) + .SetProperty("ObjectNumber", i + 1) .SetProperty("ObjectNumberGreek", greek_letters[i]) - .SetProperty("ObjectId", def.Id.SubtypeId.String); + .SetProperty("ObjectId", def.Id.SubtypeId.String) + .SetProperty("PlanetName", planetName); MyPlanetMoonItem item = new MyPlanetMoonItem(); item.Type = SystemObjectType.MOON; diff --git a/SEWorldGenPlugin/Properties/AssemblyInfo.cs b/SEWorldGenPlugin/Properties/AssemblyInfo.cs index c371392..ffe19eb 100644 --- a/SEWorldGenPlugin/Properties/AssemblyInfo.cs +++ b/SEWorldGenPlugin/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden, // indem Sie "*" wie unten gezeigt eingeben: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.7.6.0")] +[assembly: AssemblyVersion("1.7.6.1")] [assembly: AssemblyFileVersion("1.0.0")]