diff --git a/SEWorldGenPlugin/Generator/AsteroidObjects/AsteroidRing/MyAsteroidRingProvider.cs b/SEWorldGenPlugin/Generator/AsteroidObjects/AsteroidRing/MyAsteroidRingProvider.cs index c5932d7..18b6bfe 100644 --- a/SEWorldGenPlugin/Generator/AsteroidObjects/AsteroidRing/MyAsteroidRingProvider.cs +++ b/SEWorldGenPlugin/Generator/AsteroidObjects/AsteroidRing/MyAsteroidRingProvider.cs @@ -343,11 +343,11 @@ private string GetBeltName(int beltIndex) { string namingScheme = MySettings.Static.Settings.BeltNameFormat; - string name = namingScheme.SetProperty("ObjectNumber", beltIndex + 1) - .SetProperty("ObjectNumberGreek", MyNamingUtils.GREEK_LETTERS[beltIndex % MyNamingUtils.GREEK_LETTERS.Length]) - .SetProperty("ObjectNumberRoman", MyNamingUtils.ConvertNumberToRoman(beltIndex + 1)) - .SetProperty("ObjectLetterLower", (char)('a' + (beltIndex % 26))) - .SetProperty("ObjectLetterUpper", (char)('A' + (beltIndex % 26))); + string name = namingScheme.SetProperty(MyNamingUtils.PROP_OBJ_NUMBER, beltIndex + 1) + .SetProperty(MyNamingUtils.PROP_OBJ_NUMBER_GREEK, MyNamingUtils.GREEK_LETTERS[beltIndex % MyNamingUtils.GREEK_LETTERS.Length]) + .SetProperty(MyNamingUtils.PROP_OBJ_NUMBER_ROMAN, MyNamingUtils.ConvertNumberToRoman(beltIndex + 1)) + .SetProperty(MyNamingUtils.PROP_OBJ_LETTER_LOWER, (char)('a' + (beltIndex % 26))) + .SetProperty(MyNamingUtils.PROP_OBJ_LETTER_UPPER, (char)('A' + (beltIndex % 26))); return name; } diff --git a/SEWorldGenPlugin/Generator/MyStarSystemGenerator.Naming.cs b/SEWorldGenPlugin/Generator/MyStarSystemGenerator.Naming.cs index 286de38..f958f54 100644 --- a/SEWorldGenPlugin/Generator/MyStarSystemGenerator.Naming.cs +++ b/SEWorldGenPlugin/Generator/MyStarSystemGenerator.Naming.cs @@ -4,15 +4,6 @@ namespace SEWorldGenPlugin.Generator { public partial class MyStarSystemGenerator { - public static readonly string PROP_OBJ_NUMBER = "ObjectNumber"; - public static readonly string PROP_OBJ_NUMBER_GREEK = "ObjectNumberGreek"; - public static readonly string PROP_OBJ_NUMBER_ROMAN = "ObjectNumberRoman"; - public static readonly string PROP_OBJ_LETTER_LOWER = "ObjectLetterLower"; - public static readonly string PROP_OBJ_LETTER_UPPER = "ObjectLetterUpper"; - public static readonly string PROP_OBJ_ID = "ObjectId"; - public static readonly string PROP_OBJ_PARENT = "ParentName"; - - /// /// Generates a name for the planet based on the naming scheme /// defined in the global settings file @@ -24,12 +15,12 @@ private string GetPlanetName(int planetIndex, string subtypeId) { string namingScheme = MySettings.Static.Settings.PlanetNameFormat; - string name = namingScheme.SetProperty(PROP_OBJ_NUMBER, planetIndex + 1) - .SetProperty(PROP_OBJ_NUMBER_GREEK, MyNamingUtils.GREEK_LETTERS[planetIndex % MyNamingUtils.GREEK_LETTERS.Length]) - .SetProperty(PROP_OBJ_NUMBER_ROMAN, MyNamingUtils.ConvertNumberToRoman(planetIndex + 1)) - .SetProperty(PROP_OBJ_LETTER_LOWER, (char)('a' + (planetIndex % 26))) - .SetProperty(PROP_OBJ_LETTER_UPPER, (char)('A' + (planetIndex % 26))) - .SetProperty(PROP_OBJ_ID, subtypeId); + string name = namingScheme.SetProperty(MyNamingUtils.PROP_OBJ_NUMBER, planetIndex + 1) + .SetProperty(MyNamingUtils.PROP_OBJ_NUMBER_GREEK, MyNamingUtils.GREEK_LETTERS[planetIndex % MyNamingUtils.GREEK_LETTERS.Length]) + .SetProperty(MyNamingUtils.PROP_OBJ_NUMBER_ROMAN, MyNamingUtils.ConvertNumberToRoman(planetIndex + 1)) + .SetProperty(MyNamingUtils.PROP_OBJ_LETTER_LOWER, (char)('a' + (planetIndex % 26))) + .SetProperty(MyNamingUtils.PROP_OBJ_LETTER_UPPER, (char)('A' + (planetIndex % 26))) + .SetProperty(MyNamingUtils.PROP_OBJ_ID, subtypeId); return name; } @@ -46,13 +37,13 @@ private string GetMoonName(int moonIndex, string subtypeId, string parentPlanetN { string namingScheme = MySettings.Static.Settings.MoonNameFormat; - string name = namingScheme.SetProperty(PROP_OBJ_NUMBER, moonIndex + 1) - .SetProperty(PROP_OBJ_NUMBER_GREEK, MyNamingUtils.GREEK_LETTERS[moonIndex % MyNamingUtils.GREEK_LETTERS.Length]) - .SetProperty(PROP_OBJ_NUMBER_ROMAN, MyNamingUtils.ConvertNumberToRoman(moonIndex + 1)) - .SetProperty(PROP_OBJ_LETTER_LOWER, (char)('a' + (moonIndex % 26))) - .SetProperty(PROP_OBJ_LETTER_UPPER, (char)('A' + (moonIndex % 26))) - .SetProperty(PROP_OBJ_ID, subtypeId) - .SetProperty(PROP_OBJ_PARENT, parentPlanetName); + string name = namingScheme.SetProperty(MyNamingUtils.PROP_OBJ_NUMBER, moonIndex + 1) + .SetProperty(MyNamingUtils.PROP_OBJ_NUMBER_GREEK, MyNamingUtils.GREEK_LETTERS[moonIndex % MyNamingUtils.GREEK_LETTERS.Length]) + .SetProperty(MyNamingUtils.PROP_OBJ_NUMBER_ROMAN, MyNamingUtils.ConvertNumberToRoman(moonIndex + 1)) + .SetProperty(MyNamingUtils.PROP_OBJ_LETTER_LOWER, (char)('a' + (moonIndex % 26))) + .SetProperty(MyNamingUtils.PROP_OBJ_LETTER_UPPER, (char)('A' + (moonIndex % 26))) + .SetProperty(MyNamingUtils.PROP_OBJ_ID, subtypeId) + .SetProperty(MyNamingUtils.PROP_OBJ_PARENT, parentPlanetName); return name; } diff --git a/SEWorldGenPlugin/Utilities/MyNamingUtils.cs b/SEWorldGenPlugin/Utilities/MyNamingUtils.cs index 237a6e0..ed94030 100644 --- a/SEWorldGenPlugin/Utilities/MyNamingUtils.cs +++ b/SEWorldGenPlugin/Utilities/MyNamingUtils.cs @@ -10,6 +10,15 @@ public class MyNamingUtils /// public static readonly string[] GREEK_LETTERS = new string[] { "Alpha", "Beta", "Gamma", "Delta", "Epsilon", "Zeta", "Eta", "Theta", "Iota", "Kappa", "Lambda", "My", "Ny", "Xi", "Omikron", "Pi", "Rho", "Sigma", "Tau", "Ypsilon", "Phi", "Chi", "Psi", "Omega" }; + //Property names for naming + public static readonly string PROP_OBJ_NUMBER = "ObjectNumber"; + public static readonly string PROP_OBJ_NUMBER_GREEK = "ObjectNumberGreek"; + public static readonly string PROP_OBJ_NUMBER_ROMAN = "ObjectNumberRoman"; + public static readonly string PROP_OBJ_LETTER_LOWER = "ObjectLetterLower"; + public static readonly string PROP_OBJ_LETTER_UPPER = "ObjectLetterUpper"; + public static readonly string PROP_OBJ_ID = "ObjectId"; + public static readonly string PROP_OBJ_PARENT = "ParentName"; + /// /// Converts an integer to roman numerals ///