From 2125f2b18198cb509b10c8098bda4477d98febe4 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Wed, 30 Sep 2026 20:46:35 +0200 Subject: [PATCH] AetherDb: retire the damage-curves one-shot It landed its content; git history keeps it. Co-Authored-By: Claude Opus 5.5 --- tools/AetherDb/Program.cs | 47 +-------------------------------------- 1 file changed, 1 insertion(+), 46 deletions(-) diff --git a/tools/AetherDb/Program.cs b/tools/AetherDb/Program.cs index a94782379..034bbfd6f 100644 --- a/tools/AetherDb/Program.cs +++ b/tools/AetherDb/Program.cs @@ -36,9 +36,8 @@ public static class Program case "targeting-catalog": return TargetingCatalog(args.Contains("apply")); case "targeting-catalog-6c": return TargetingCatalog6c(args.Contains("apply")); case "targeting-catalog-6d": return TargetingCatalog6d(args.Contains("apply")); - case "damage-curves": return DamageCurves(args.Contains("apply")); default: - Console.WriteLine("commands: census, factions, station-fit, hardpoint-fit, loadout [seed], save, settings, settings-dump, dangling [clear ]... [apply], shield-migrate [apply], brownout-migrate [apply], roles-migrate [apply], firing-arc-migrate [apply], targeting-catalog [apply], targeting-catalog-6c [apply], targeting-catalog-6d [apply], damage-curves [apply]"); + Console.WriteLine("commands: census, factions, station-fit, hardpoint-fit, loadout [seed], save, settings, settings-dump, dangling [clear ]... [apply], shield-migrate [apply], brownout-migrate [apply], roles-migrate [apply], firing-arc-migrate [apply], targeting-catalog [apply], targeting-catalog-6c [apply], targeting-catalog-6d [apply]"); return 1; } } @@ -1472,48 +1471,4 @@ public static class Program Console.WriteLine($"\nLanded {precisionChanges.Length} Precision changes in Aetheria.cc"); return 0; } - - // Soul's F4 (scenarios batch 3): five sold weapons had no DamageCurve, and the first NPC to sample their damage - // at range threw. Each takes the curve of its nearest comparable weapon, same weapon class first, then closest - // range and damage. Every curve in the catalog was the same one (full damage at minimum range, falling to none - // at maximum), so what is copied is that curve; the source is named so the operator can tune from it. - private static int DamageCurves(bool apply) - { - var db = AetherDb.Open(catalogWritable: apply); - var cache = db.Cache; - var sources = new (string Weapon, string Source, string Why)[] - { - ("Autocannon", "DeathCluster", "auto-fire, Ballistic, 4 cells; the other auto-fire Ballistic whose range reaches 1000"), - ("LRMM72", "GT 3K", "the only other unguided launcher"), - ("SRMM72", "scorched void policy", "guided launcher; SRMM72's 750 range and 128 damage sit inside its 500-1250 and 128-512"), - ("pswarm", "scorched void policy", "guided launcher with identical damage, range and cooldown"), - ("plight", "ChargeBlast+-", "charged Energy weapon; nearest range (800-1900 against plight's 500-2000)"), - }; - WeaponData WeaponOf(string name) => - cache.GetAll().Single(d => d.Name == name).Behaviors.OfType().Single(); - var changed = new List<(EquippableItemData Design, CultRecordKey Key)>(); - foreach (var (weapon, source, why) in sources) - { - var target = WeaponOf(weapon); - if (target.DamageCurve != null) throw new InvalidOperationException($"{weapon} already has a DamageCurve."); - var curve = WeaponOf(source).DamageCurve; - target.DamageCurve = new BezierCurve { Keys = curve.Keys.ToArray() }; - var design = cache.GetAll().Single(d => d.Name == weapon); - changed.Add((design, cache.RefOf(design).Key)); - Console.WriteLine($"{weapon,-10} <- {source,-22} ({why}): keys {string.Join(" ", curve.Keys.Select(k => $"({k.x}, {k.y}, {k.z}, {k.w})"))}"); - } - - if (!apply) - { - Console.WriteLine("\nDry run. Pass \"apply\" to land it."); - return 0; - } - foreach (var (design, _) in changed) CultRecordRefs.Validate(design); - cache.Commit(batch => - { - foreach (var (design, key) in changed) batch.Upsert(design.GetType(), design, key); - }); - Console.WriteLine($"\nLanded {changed.Count} DamageCurves in Aetheria.cc"); - return 0; - } }