feat(content): bake and read flat collision assets
Append strict collision/topology payloads to the existing prepared package so later physics cutover can drop parsed DAT graphs without adding a second mapping or changing traversal behavior. The full 2,232,170-key catalog is deterministic across worker counts, exact-byte aliased, corruption-isolated, and cancellation-safe.
This commit is contained in:
parent
d9300c7854
commit
9cd42417a8
29 changed files with 2868 additions and 63 deletions
|
|
@ -8,7 +8,8 @@ public static class BakeArtifactValidator
|
|||
public static void Validate(
|
||||
string path,
|
||||
in PakHeader expectedHeader,
|
||||
int expectedTocCount)
|
||||
int expectedTocCount,
|
||||
IReadOnlyDictionary<PakAssetType, int>? expectedTypeCounts = null)
|
||||
{
|
||||
using var reader = new PakReader(path);
|
||||
var actual = reader.Header;
|
||||
|
|
@ -35,5 +36,18 @@ public static class BakeArtifactValidator
|
|||
$"{expectedTocCount}");
|
||||
|
||||
reader.ValidateTocStructure();
|
||||
if (expectedTypeCounts is null)
|
||||
return;
|
||||
|
||||
foreach ((PakAssetType type, int expectedCount) in expectedTypeCounts)
|
||||
{
|
||||
int actualCount = reader.CountEntries(type);
|
||||
if (actualCount != expectedCount)
|
||||
{
|
||||
throw new InvalidDataException(
|
||||
$"bake catalog type {type} contains {actualCount} keys; " +
|
||||
$"expected {expectedCount}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue