From 6218f9fdc1f4db26b15a70ba0465e4071ef3a1f4 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Thu, 8 Oct 2026 23:47:54 +0200 Subject: [PATCH] Roles backfill: Count and MinRange take a role but are never ranged; fix a broken string in the catalog test Co-Authored-By: Claude Sonnet 5.5 --- tools/AetherDb/Program.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/AetherDb/Program.cs b/tools/AetherDb/Program.cs index 9b87bf9b0..97e5c9151 100644 --- a/tools/AetherDb/Program.cs +++ b/tools/AetherDb/Program.cs @@ -1738,6 +1738,10 @@ public static class Program private static readonly string[] BackfillDesigns = { "Autocannon", "LRMM72", "SRMM72", "Mine Launcher", "Large Drive", "Small Drive", "DeathCluster", "Flak Gun", "GT 3K", "plight", "MoveOnPro", "MoveOnPro Station Reactor" }; + // Stats the backfill names but never ranges: a shot count is whole, and which way a launcher's MinRange should fall is + // each design's own call (GT 3K authors it as a cost already). + private static readonly HashSet RoleOnlyStats = new HashSet(StringComparer.Ordinal) { "Count", "MinRange" }; + private static readonly HashSet CostStats = new HashSet(StringComparer.Ordinal) { "Cooldown", "Spread", "Heat", "Visibility", "Energy", "EnergyUsage", "ChargeTime", "ChargeEnergy", "ChargeHeat", @@ -1784,6 +1788,7 @@ public static class Program var value = stat.Min; if (stat.Min == stat.Max) { + if (RoleOnlyStats.Contains(field.Name)) continue; // a count or a per-design bound: never ranged if (stat.Min == 0f || float.IsInfinity(stat.Min)) continue; (stat.Min, stat.Max) = CostStats.Contains(field.Name) ? (value * 1.2f, value * .8f) : (value * .8f, value * 1.2f); quality ??= new StatTerm { Source = StatSource.Quality, Exponent = ExponentFor(kind, field.Name) };