Ship S2: the game composes and loads mod ships

Boot opens the derived catalog when GameData/Mods holds packages
(ShipModCatalog.ResolveCatalog), preloads each hull's GLB into an assembled
inactive prototype (ShipModShips), and LoadEntity clones it when the hull names
a Visual. ShipModPlan decides which anchor fills which ShipInstance slot; a
ShipModTemplate prefab carries the shared effects. Continue refuses a run that
names a design the catalog no longer holds (RunSave.RequireDesigns).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-09-30 06:43:52 +02:00
commit 460bb85ed0
16 changed files with 702 additions and 13 deletions

View file

@ -30,9 +30,8 @@ public static class ShipModVisual
public Transform Get(uint index) => m_Nodes.TryGetValue(index, out var node) ? node.transform : null;
}
public static async Task<Instance> LoadAsync(string shipPath, Transform parent)
public static async Task<Instance> LoadAsync(ShipModCatalog.Package package, Transform parent)
{
var package = ShipModCatalog.ReadPackage(shipPath);
var ship = package.Visual;
var root = new GameObject("mod-ship:" + ship.Id);