Wren becomes a test fixture; compose and validate refuse an offered hull with no schematic
Move the starter-box aetheria.wren package from GameData/Mods to tests/fixtures/mods (LFS rule added) so it no longer ships; the Wren tests compose it through TestCatalog.RepoWithFixtures. ShipModCatalog.SchematicFault, built on LoadoutGenerator.IsOffered, excludes an offered hull with no schematic lines at compose and is reported by ship-authoring validate. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
3b7b55f384
commit
ce5d012540
13 changed files with 121 additions and 9 deletions
|
|
@ -53,6 +53,10 @@ public static class ShipAuthoringCommands
|
|||
var judged = model != null && File.Exists(model) ? "records and model" : "records only, no model yet";
|
||||
if (judged == "records and model") ShipModCatalog.ReadPackage(args[1]);
|
||||
else ShipAuthoringStore.ValidateLoaded(hull, ship, products);
|
||||
// Compose refuses an offered hull with no schematic; the author sees that verdict here, before compose.
|
||||
// A package with no products is never offered, so the shipped catalog (which only resolves a product's bin) is opened for none.
|
||||
using var catalog = products.Length > 0 ? AetherDb.Open().Cache : null;
|
||||
if (ShipModCatalog.SchematicFault(catalog, ship, products) is { } fault) throw new InvalidOperationException(fault);
|
||||
Console.WriteLine($"{ship.Id}: {hull.Name}, {hull.Hardpoints.Count} hardpoints, {ship.Anchors.Count} anchors, {ship.SchematicLines.Count} lines ({judged})");
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue