diff --git a/ObservatoryExplorer/DefaultCriteria.cs b/ObservatoryExplorer/DefaultCriteria.cs index 145d0ce..a5962c4 100644 --- a/ObservatoryExplorer/DefaultCriteria.cs +++ b/ObservatoryExplorer/DefaultCriteria.cs @@ -203,9 +203,113 @@ namespace Observatory.Explorer results.Add("All Premium Boost Materials In System"); } + if (settings.UncommonSecondary && scan.BodyID > 0 && !string.IsNullOrWhiteSpace(scan.StarType) && scan.DistanceFromArrivalLS > 10) + { + var excludeTypes = new List() { "O", "B", "A", "F", "G", "K", "M", "L", "T", "Y", "TTS" }; + if (!excludeTypes.Contains(scan.StarType.ToUpper())) + { + results.Add("Uncommon Secondary Star Type", $"{GetUncommonStarTypeName(scan.StarType)}, Distance: {scan.DistanceFromArrivalLS:N0}Ls"); + } + } + return results; } + private static string GetUncommonStarTypeName(string starType) + { + string name; + + switch (starType.ToLower()) + { + case "b_bluewhitesupergiant": + name = "B Blue-White Supergiant"; + break; + case "a_bluewhitesupergiant": + name = "A Blue-White Supergiant"; + break; + case "f_whitesupergiant": + name = "F White Supergiant"; + break; + case "g_whitesupergiant": + name = "G White Supergiant"; + break; + case "k_orangegiant": + name = "K Orange Giant"; + break; + case "m_redgiant": + name = "M Red Giant"; + break; + case "m_redsupergiant": + name = "M Red Supergiant"; + break; + case "aebe": + name = "Herbig Ae/Be"; + break; + case "w": + case "wn": + case "wnc": + case "wc": + case "wo": + name = "Wolf-Rayet"; + break; + case "c": + case "cs": + case "cn": + case "cj": + case "ch": + case "chd": + name = "Carbon Star"; + break; + case "s": + name = "S-Type Star"; + break; + case "ms": + name = "MS-Type Star"; + break; + case "d": + case "da": + case "dab": + case "dao": + case "daz": + case "dav": + case "db": + case "dbz": + case "dbv": + case "do": + case "dov": + case "dq": + case "dc": + case "dcv": + case "dx": + name = "White Dwarf"; + break; + case "n": + name = "Neutron Star"; + break; + case "h": + name = "Black Hole"; + break; + case "supermassiveblackhole": + name = "Supermassive Black Hole"; + break; + case "x": + name = "Exotic Star"; + break; + case "rogueplanet": + name = "Rogue Planet"; + break; + case "tts": + case "t": + name = "T Tauri Type"; + break; + default: + name = starType + "-Type Star"; + break; + } + + return name; + } + private static bool RemoveMatchedMaterials(this List materials, Scan body) { foreach (var material in body.Materials)