Skip to content

Expose cargo and passenger UI actions - #356

Open
sviyh wants to merge 1 commit into
SmashPhil:developfrom
sviyh:feat/named-cargo-passenger-actions
Open

Expose cargo and passenger UI actions#356
sviyh wants to merge 1 commit into
SmashPhil:developfrom
sviyh:feat/named-cargo-passenger-actions

Conversation

@sviyh

@sviyh sviyh commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • refactor cargo and passenger action boundaries for Multiplayer compatibility
  • expose stable named actions for the vehicle cargo dialog
  • expose passenger transfers with explicit pawn, hovered pawn, and target-holder inputs
  • preserve the existing UI behavior while allowing Multiplayer compatibility to bind public methods instead of compiler-generated lambdas and UI-static drag state

Root cause

Cargo and passenger mutations were embedded in UI delegates or depended on static drag fields. External integrations therefore had to identify compiler-generated callbacks or reconstruct state that the Vehicle Framework already owns.

Approach

  • route the load-cargo gizmo through VehiclePawn.OpenLoadCargoDialog
  • extract Accept, Reset, Cancel, PackInstantly, and SetToSendEverything from Dialog_LoadCargo
  • route passenger drag completion through VehicleTabHelper_Passenger.TransferPawn and pass the pawn/holders explicitly through the seat-change bookkeeping

The original UI paths still call these methods; the change only provides stable action boundaries.

Test plan

  • Release build succeeds with no warnings or errors
  • Rebuild Vanilla Vehicles Expanded against this exact Vehicle Framework build
  • Manual single-player: open the cargo dialog; exercise Reset, Cancel, Accept, cancel-loading, select-everything, and instant packing
  • Manual single-player: transfer passengers between compatible handlers, swap occupied handlers, and verify rejection paths leave assignments unchanged
  • Manual single-player: save/reload after cargo and passenger changes and verify holders/counts remain correct

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.

1 participant