Skip to content

Support subtype INTERNAL fields#42

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

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"

Caveat

This remains a draft because the runtime proof is a targeted headless KSP harness against the loaded part prefab/config path, not a real flight/B9 IVA switch visual smoke test in the shuttle scenario from the issue.

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