From aae779c6533440fa4761085407ccd9c9c8cf558d Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Tue, 13 Oct 2026 06:02:47 +0200 Subject: [PATCH] Revert "Retire AetherDb pickup-catalog: applied in the previous commit, a one-shot" This reverts commit 72872c98170e2b633eeca36695115c25a7b8b13c. --- tools/AetherDb/Program.cs | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/tools/AetherDb/Program.cs b/tools/AetherDb/Program.cs index f3e2f5be7..2389297f5 100644 --- a/tools/AetherDb/Program.cs +++ b/tools/AetherDb/Program.cs @@ -42,6 +42,7 @@ public static class Program case "field-kinds": return FieldKindsCatalog(args.Contains("apply")); case "pd-gear": return PdGearCatalog(args.Contains("apply")); case "mine-launcher": return MineLauncherCatalog(args.Contains("apply")); + case "pickup-catalog": return PickupCatalog(args.Contains("apply")); case "smoke-hull": return SmokeHullCatalog(args.Contains("apply")); case "smoke-rounds": return SmokeRoundsCatalog(args.Contains("apply")); case "roles-backfill": return RolesBackfill(args.Contains("apply")); @@ -51,7 +52,7 @@ public static class Program return PiratesFaction(args.Contains("apply")); case "verse-grammar": return VerseGrammarCommand.Run(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], ship-authoring create|inspect|validate|compose, field-kinds [apply], mine-launcher [apply], smoke-hull [apply], smoke-rounds [apply], roles-backfill [apply], pd-gear [apply], consumables-first-set [apply], pirates-faction [apply], verse-grammar [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], ship-authoring create|inspect|validate|compose, field-kinds [apply], mine-launcher [apply], pickup-catalog [apply], smoke-hull [apply], smoke-rounds [apply], roles-backfill [apply], pd-gear [apply], consumables-first-set [apply], pirates-faction [apply], verse-grammar [apply]"); return 1; } } @@ -1767,6 +1768,40 @@ public static class Program return 0; } + // loot-2: pickup is a capability. The existing Tractor Beam (a Sensors-hardpoint item with no behaviours) becomes + // Tool gear whose one behaviour is Pickup, so a ship carries it in any free interior cell and Zone's pickup needs + // it. The numbers are the retired prefab's beam: range 75, beam radius 25; the grab's phase times, the spin-up + // rate and the power needed to grab are the cut's. Dry run unless passed "apply". + private static int PickupCatalog(bool apply) + { + const string name = "Tractor Beam"; + var db = AetherDb.Open(catalogWritable: apply); + var beam = db.Cache.GetAll().Single(gear => gear.Name == name); + if (beam.Hardpoint == HardpointType.Tool && beam.Behaviors.Count == 1 && beam.Behaviors[0] is PickupData) + { + Console.WriteLine($"\"{name}\" is already authored; nothing to do."); + return 0; + } + if (beam.Behaviors.Count != 0) throw new InvalidOperationException($"\"{name}\" already has behaviours."); + Console.WriteLine($"\"{name}\" hardpoint {beam.Hardpoint} -> Tool, no behaviours -> one Pickup (range 75, beam radius 25, grab power .5, extend .3, envelop .2, pull .5, spin rate 2)."); + if (!apply) + { + Console.WriteLine("\nDry run. Pass \"apply\" to write it."); + return 0; + } + PerformanceStat Constant(float v) => new PerformanceStat { Min = v, Max = v }; + beam.Hardpoint = HardpointType.Tool; + beam.Behaviors.Add(new PickupData + { + Range = Constant(75), BeamRadius = Constant(25), GrabPower = Constant(.5f), SpinRate = Constant(2), + ExtendTime = Constant(.3f), EnvelopTime = Constant(.2f), PullTime = Constant(.5f) + }); + CultRecordRefs.Validate(beam); + db.Cache.Commit(batch => batch.Upsert(typeof(GearData), beam, db.Cache.RefOf(beam).Key)); + Console.WriteLine($"\nWrote \"{name}\" to Aetheria.cc"); + return 0; + } + // sim-mines-presenter: the Mine Launcher item, so a ship can be fitted with the sim's mine layer. Its numbers // are the 2021 record's (GameData/Legacy/AetherDB.2021-03-05.msgpack, recovered in 8c71a637: mass 75, price // 125000, damage 50, range 2000, energy 15, heat 500, visibility 10, magazine 6, reload 5, spread 5, velocity