refactor(world): extract live projection mechanics

Move appearance rebinding, collision construction, default-pose resolution, local shadow ownership, and exact leave-world presentation into focused owners. Preserve retail parent ordering with staged validation, committed recovery, recursive attached-subtree withdrawal, and retryable exact teardown across parent, pickup, position, unwield, and pose-loss edges.

Co-Authored-By: OpenAI Codex <codex@openai.com>
This commit is contained in:
Erik 2026-07-21 16:17:03 +02:00
parent c87bac31a0
commit 69a2ca0c6d
26 changed files with 4172 additions and 430 deletions

View file

@ -103,6 +103,26 @@ public class ShadowShapeBuilderTests
Assert.Equal(1, bspCount);
}
[Fact]
public void FromSetup_EffectivePartIdentitiesControlPhysicsBspSelection()
{
const uint replacementWithBsp = 0x0100AA01u;
const uint replacementWithoutBsp = 0x0100AA02u;
var setup = new Setup
{
Parts = { 0x010044B5u, 0x010044B6u },
};
var shapes = ShadowShapeBuilder.FromSetup(
setup,
entScale: 1f,
hasPhysicsBsp: id => id == replacementWithBsp,
effectivePartGfxObjIds: [replacementWithBsp, replacementWithoutBsp]);
ShadowShape shape = Assert.Single(shapes);
Assert.Equal(replacementWithBsp, shape.GfxObjId);
}
[Fact]
public void FromSetup_CreatureWithCylSpheres_OnlyEmitsCylinders()
{