Ship S2 fixes: RequireDesigns refuses nulls explicitly, and a failing Compose falls back to the shipped catalog
- RequireDesigns names the null (entity, item, zone record, lot, lot ledger) instead of catching NullReferenceException. - ResolveCatalog reports a Compose-level failure as an exclusion covering all mods and boots the shipped catalog. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
8f8b72be3c
commit
34319b0df1
5 changed files with 77 additions and 23 deletions
|
|
@ -158,7 +158,10 @@ public static class ShipModCatalog
|
|||
if (!Directory.Exists(modsRoot) ||
|
||||
!Directory.GetDirectories(modsRoot).Any(directory => File.Exists(Path.Combine(directory, "ship.cc"))))
|
||||
return (shippedCatalog, Array.Empty<Exclusion>());
|
||||
var composition = Compose(shippedCatalog, derivedCatalog, modsRoot);
|
||||
Composition composition;
|
||||
// A failure of the composition itself (an unwritable derived path, say) is still a mod problem, never a reason not to boot.
|
||||
try { composition = Compose(shippedCatalog, derivedCatalog, modsRoot); }
|
||||
catch (Exception error) { return (shippedCatalog, new[] { new Exclusion { Package = "(all mods)", Reason = error.Message } }); }
|
||||
return (composition.Included.Length == 0 ? shippedCatalog : derivedCatalog, composition.Excluded);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue