4.7 KiB
Native medical effects fixture
ERR_NativeMedicalProbe is an opt-in WORKBENCH-only Core fixture. It owns two ordinary configured prisoner characters and three real stock-type items: one dressing and two saline bags. It never wounds, transfers inventory from, changes consciousness on, or deletes the actual player. It does not change production health settings, thresholds, regeneration or medicine configuration.
The fixture waits for character initialization, inserts the items into the healer's inventory, and checks that a healthy casualty rejects both treatment types. It wounds an actual left-arm hit zone and adds vanilla bleeding, then seeds the casualty's blood 100 units below its native unconsciousness threshold. The initial blood reduction is a scripted casualty condition. Subsequent blood changes are left to native bleeding and healing: five seconds later, the fixture requires further actual blood loss and unconsciousness.
Treatment uses each real SCR_ConsumableItemComponent.ApplyItemEffect with the item's configured effect, deletion policy and native animation-parameter data. This is the same completion boundary reached by a successful native item action. It deliberately does not claim that a human-facing action, animation, proximity prompt or inventory menu completed. The dressing must be physically deleted and native bleeding stopped. Saline must move into the casualty's native treatment slot and install exactly one saline damage effect. A second bag must be rejected as already applied and remain a physical inventory item.
The bag runs its unchanged native 90-second infusion. The fixture samples blood, unconsciousness, attached bags and saline effects, with diagnostics every ten seconds. It requires substantial native blood restoration and actual regained consciousness without calling SetUnconscious, restoring hit-zone health, or advancing effect time artificially. It then requires the bag's native deletion and release of its slot and damage effect, preserving the spare bag.
Tick(now) returns 0 while pending, 1 on success and -1 on failure. It has a 120-second internal deadline, including initialization. Stop() is idempotent and deletes only its recorded items and characters, so interrupted runner shutdown cannot leave fixture stock or casualty actors in the mission. The native delayed saline deletion routine is null-safe if its owned item was deleted during fixture cleanup. This cleanup behavior is source-grounded; interruption during a real treatment animation, disconnects, casualty carrying/loading, morphine, tourniquet use and multiplayer recovery remain untested.
Integration into the existing Core smoke runner
No shared ERR_GameMode, ERR_NativeBaseSmoke or runner tool file is changed by this handoff. Suggested integration:
- Add outcome
medicalto the existing runner choices; run the Core smoke world with-errBaseSmoke 1 -errSmokeOutcome medical. - Add
protected ref ERR_NativeMedicalProbe m_ERRBaseMedicalProbe;to the WORKBENCH smoke mode, plusprotected void ERR_StopMedicalProbe() { if (m_ERRBaseMedicalProbe) m_ERRBaseMedicalProbe.Stop(); }. Register it onOnStop()alongside other probe cleanup; call it fromERR_BaseCheckfailure cleanup too. - In step 0 after the real prisoner has spawned, before the ordinary escape actions, branch on outcome
medical: constructnew ERR_NativeMedicalProbe(this), set step600, then return. The fixture handles spawning its own actors on its first tick. - Before the ordinary step dispatch, poll step 600. On
-1, remove the BaseTick call. On1, set step602and requestTransition(ERR_Phase.DEFEAT)solely as an explicit fixture reset. - In the terminal-result handler, handle outcome
medicalbefore the ordinary victory assertion. Requirecurrent == ERR_Phase.DEFEAT && m_ERRBaseStep == 602, then print the dedicated fixture completion. Keep the existing global 210-second deadline.
The local repository isolation/resource/policy checks pass for this source. Native Enforce compilation and execution are pending the parent's centralized hidden and muted runner. No medical/manual/multiplayer acceptance is marked passed by this addition.
Observed native run
062406 completed all24 assertions with no script/VM failures. Blood fell to1783.02 with active bleeding and unconsciousness. After real dressing and saline application, bleeding stopped; blood rose past2188.59 and native consciousness returned. The unchanged infusion completed, removed its bag/effect and left the rejected spare in inventory. The overall report still fails on seven inherited vehicle catalog schema errors. This evidence is tied to its launch source manifest and does not qualify later edits or manual/multiplayer treatment.