Skip to content

Support subtype INTERNAL fields#42

Open
Sean-Kenneth-Doherty wants to merge 1 commit into
FirstPersonKSP:mainfrom
Sean-Kenneth-Doherty:preserve-internal-config
Open

Support subtype INTERNAL fields#42
Sean-Kenneth-Doherty wants to merge 1 commit into
FirstPersonKSP:mainfrom
Sean-Kenneth-Doherty:preserve-internal-config

Conversation

@Sean-Kenneth-Doherty
Copy link
Copy Markdown

@Sean-Kenneth-Doherty Sean-Kenneth-Doherty commented May 18, 2026

Summary

  • let each selected B9 subtype provide its own nested INTERNAL values for Reviva's runtime part config
  • keep the runtime INTERNAL name synchronized with the selected subtype
  • document how subtype authors can provide fields such as offset for part/internal relationships that need them

Addresses #35.

Context

Issue #35 is about IVA switches that need per-part/per-internal fields such as offset. This implementation does not copy one shared part INTERNAL node across every selected IVA. Instead, Reviva creates a fresh runtime INTERNAL node for the selected subtype, sets that subtype's internal name, and copies only extra fields from an INTERNAL node nested under that same subtype's ModuleIVASwitch data.

Validation

  • git diff --check
  • dotnet build Reviva.sln -c Release --no-restore /p:KSPRoot="/home/sean/.local/share/Steam/steamapps/common/Kerbal Space Program": 0 warnings, 0 errors
  • KSP 1.12.5 main-menu runtime harness with ModuleManager 4.2.3 and B9PartSwitch 2.21.0.4:
    • baseline Reviva reached methodSignature=newName and failed to copy subtype offset/scale
    • patched branch reached methodSignature=newName,moduleConfig and passed with afterOffset="1.25, -2.5, 3.75" and afterScale="0.95, 0.95, 0.95"
  • KSP 1.12.5 headless flight/B9 switch harness with a live mk2LanderCabin vessel:
    • baseline Reviva switched Stock -> ProofOffset but failed to copy internalName, offset, or scale
    • patched branch switched Stock -> ProofOffset and passed with afterName=landerCabinSmallInternal, afterOffset="1.25, -2.5, 3.75", and afterScale="0.95, 0.95, 0.95"

Caveat

This was tested with a headless real-flight B9 switch harness, not an interactive IVA screenshot in the shuttle scenario from the issue.

@Sean-Kenneth-Doherty Sean-Kenneth-Doherty marked this pull request as ready for review May 20, 2026 13:18
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