Skip to content

Expose NPC vehicle lifecycle events - #267

Open
diffuin[bot] wants to merge 1 commit into
stablefrom
diffuin/243-29624926
Open

Expose NPC vehicle lifecycle events#267
diffuin[bot] wants to merge 1 commit into
stablefrom
diffuin/243-29624926

Conversation

@diffuin

@diffuin diffuin Bot commented Aug 13, 2026

Copy link
Copy Markdown

Requested by @ifBars in #243.

Diffuin response

Confidence: Medium

Implemented PR-ready NPC vehicle entry and exit events with cached dual-runtime delegate bridges and scene-cleanup detachment. Pull request creation is not available in this environment; the patch fully resolves issue #243 when submitted.

Recommended next steps

  1. Added documented Action events without changing existing API members.
  2. Bridges attach while either managed event has handlers and detach using the same cached delegate instances.
  3. The events add no persistence or S1API networking; they follow native callback delivery.
Evidence and validation

Evidence inspected

  • Regular and beta Mono NPC declarations expose public Action onEnterVehicle and onExitVehicle fields.
  • NPC.CurrentVehicle already uses the direct LandVehicle conversion path.
  • NPCMessaging and NPCRelationship provide the cached IL2CPP delegate conversion and removal pattern used by this patch.

Validation performed

  • Read repository, modding, implementation, and writing guidance.
  • Verified native callback declarations in regular and beta stripped source.
  • Ran git diff --check and reviewed the final two-file diff.
  • Confirmed no .NET SDK, MSBuild, or C# compiler is available.

Runtime validation remaining

  • Run restore, build, and test for MonoMelon and Il2CppMelon with local game references.
  • In both runtimes, verify callback timing, unsubscription, NPC destruction, and scene transitions.
  • Verify host and remote-client callback delivery. No multiplayer, save/load, Unity runtime, or end-to-end validation ran.
Diffuin run details
  • Provider: codex
  • Model: gpt-5.6-terra
  • Reasoning: high (Luna advisor: balanced (high); baseline bounded implementation)
  • Elapsed: 487s
  • Codex thread: 019ff8ea-43ee-7a52-b3a8-d57cfe2d4298

AI notice: Generated with AI assistance and not guaranteed accurate. Verify findings and plans against the current source and runtime.

Closes #243


Diffuin job: 29624926-e1bd-4f77-9837-2d947aa9a1d2
Commit: c3d31e4652bd208e2c8aa81c4345cf1adf986c27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Expose NPC vehicle entry and exit events

0 participants