Files
EscapistsReintroduced/docs/native-casualty-remove.md
T
jakub cab998fb64 Combine Workshop addon and fix prison startup
Merge owned systems into one addon while preserving resource identities. Gate player admission on the replicated prison scene, restore the original framed door, and hold enemy AI until escape. Correct scenario branding and author metadata, include publishing assets, and retain regression and native verification evidence.
2026-09-20 16:42:52 +02:00

5.4 KiB

Native casualty removal fixture

--project core --smoke casualty-remove is an opt-in WORKBENCH completion-boundary experiment using the helicopter's existing stock SCR_RemoveCasualtyUserAction. It adds no production unload action or resource and makes no manual held-input, remote ownership, multiplayer, or casualty recovery claim.

The fixture shares the existing test-owned wounded actor, actual five-second unconscious settling interval, real child Mi8 cargo bench entry, physical occupancy and isolated extraction-boundary groundwork. It additionally requires the production mission helicopter to be physically supported and stable before it starts. Only the test-owned casualty is protected against nearby guard gunfire; the original native health-driven unconscious transition remains. The real caller's existing fixture invulnerability is configured by the Core smoke runner, and the fixture restores only the same caller's position.

After actual boarding it finds the stock remove action whose native compartment equals the occupied bench and whose exterior context is door_l01_door. It verifies the one-second duration, nonlocal effect and actual context membership. It selects the door using the same native PickDoorIndexForPoint(context.GetOrigin()) mechanism as the stock action wrapper. The action's cached door index is set explicitly because this fixture does not select an interaction UI context; its old value is restored on success, failure or cleanup.

The expected exit is read from that door's native GetExitTeleportPointInfo() world transform. The fixture first uses the bench manager's resolved door info. If it exposes a reference instead, the diagnostic records the referenced manager and animation door index before attempting its door info. Missing or unresolved native points fail; no hardcoded door zero or arbitrary exit position is substituted. Native run 080058 verifies this selected door and point on the installed version; other doors and reference-resolution paths remain separate cases.

The real caller is placed just outside the actual exterior context and allowed one second to settle. Native CanBeShown and CanBePerformed must accept the actual caller and still-occupied bench before the fixture invokes the real stock PerformAction exactly once. That implementation uses native KickFromVehicle(relevantDoorIndex), whose installed API describes use of the teleport exit point. Calling action completion does not exercise holding or canceling user input, network action dispatch, or UI selection.

An eight-second observation window requires actual vehicle/seat vacancy, an accessible bench, a living still-incapacitated body, no ongoing get-out transition/falling, root horizontal error at most 1.25 metres from the authored exit, and root clearance from terrain between -0.25 and 1.5 metres. Diagnostics include root and aiming positions, pre-exit seated position, authored exit, terrain clearance, ragdoll/link/falling state and native compartment events. These are explicit bounded acceptance measurements, not a full collision-shape safety or clearance survey. No target transform, health recovery, wake or retry is applied after boarding. The entire fixture is bounded to 45 seconds and success uses the existing explicit Core test reset at step 802.

The previous casualty-bench experiment retains its original arbitrary-ground GetOutVehicle_NoDoor target and original distance assertion unchanged, now behind default fixture hooks. Its historical failed target-position evidence remains failed and distinct from this stock door-action experiment.

Local verification: python3 tests/test_casualty_remove_probe.py passes extracted production fixture boundary policy and focused action/cleanup/old-mechanism/runner contracts. 080058 now passes 66 native assertions with zero engine or script/VM errors. The inherited removal action resolves the occupied bench's door_l01_door context and native authored exit. The real conscious caller passes visibility/permission checks; one direct action-completion invocation produces an actual native exit event and clears vehicle/seat occupancy. The test-owned casualty remains living and incapacitated, with no getting-out/falling state and an accessible empty bench. It first exceeds the terrain-clearance bound, then settles within the original eight-second observation window: horizontal exit error is 0.710329m and root terrain clearance is 0.862961m. No post-boarding target teleport, recovery or retry is used.

The pre-removal isolated extraction check counts the seated casualty. Post-removal checks establish physical helicopter/bench vacancy; they do not recalculate the already-frozen extraction snapshot. This is local stock-action completion evidence, not held input, interaction-context selection, remote action delivery, all-door clearance or multiplayer acceptance. The fixture requests its own reset; no acceptance ledger is changed.

Merge:

  • New addons/core/Scripts/Game/ERR/00_Core/ERR_NativeCasualtyRemoveProbe.c.
  • New tests/test_casualty_remove_probe.py.
  • Core smoke and the hidden runner expose casualty-remove; base-probe exit hooks preserve the earlier independent casualty-bench mechanism case.
  • This note may become docs/native-casualty-remove.md.

Installed primary source hashes are recorded in vanilla-reference-sha256.json. Source inspection was read-only and no original Escapists content was reused.