Skip to content

Mechjeb 2.15.1 full feature parity#171

Merged
JonnyOThan merged 6 commits intoFirstPersonKSP:mechjebfrom
adventure-gpt:mechjeb-2.15.1-full-feature-parity
Mar 30, 2026
Merged

Mechjeb 2.15.1 full feature parity#171
JonnyOThan merged 6 commits intoFirstPersonKSP:mechjebfrom
adventure-gpt:mechjeb-2.15.1-full-feature-parity

Conversation

@adventure-gpt
Copy link
Copy Markdown

Add full MechJeb 2.15.1 IVA feature parity

This adds comprehensive IVA menu support for MechJeb 2.15.1, achieving
near-100% feature parity with MJ's IMGUI interface.

New files:

  • MechJebProxy.cs: Complete reflection-based wrapper for MJ 2.15.1

    • 367 public static methods covering all MJ autopilots
    • Ascent, landing, rendezvous, docking autopilots
    • Attitude control, thrust limiting, staging control
    • Maneuver planner operations
    • All use PascalCase field names for MJ 2.15.1 compatibility
  • MechJebRPMMenu.cs: Enhanced IVA text menu system

    • Full ascent guidance menus with all parameters
    • Landing guidance with target selection
    • Rendezvous and docking autopilot controls
    • Maneuver planner with orbit operations
    • Smart A.S.S. attitude control
    • Thrust and staging controller settings

Modified:

  • OrbitExtensions.cs: Enable orbit helper methods needed by new menus
    (SwappedOrbitalVelocityAtUT, Radius, NextApoapsisTime, etc.)

Local User added 2 commits January 20, 2026 12:25
- Update JSIMechJeb.cs field bindings to use PascalCase for MJ 2.15.1:
  - MechJebCore: target->Target, node->Node, attitude->Attitude, vesselState->VesselState
  - AbsoluteVector: latitude->Latitude, longitude->Longitude
  - ComputerModule: enabled->Enabled, users->Users
  - EditableDouble/EditableDoubleMult: val->Val property
  - ReentrySimulation.Result: outcome->Outcome, endPosition->EndPosition, endUT->EndUT

- Add MechJebModuleAscentSettings support (replaces AscentAutopilot/AscentGuidance):
  - DesiredOrbitAltitude, DesiredInclination fields
  - AscentAutopilot property access for autopilot control

- Fix FuelFlowSimulation type lookup:
  - Try MechJebLib assembly first (MJ 2.15.1 moved it there)
  - Fall back to nested type in MechJeb2 assembly

- Fix stage stats handling for List<FuelStats>:
  - Use Count property and get_Item method instead of array access

- Fix ButtonAscentGuidance/ButtonAscentGuidanceState:
  - Try MechJebModuleAscentBaseAutopilot first
  - Fall back to AscentSettings.AscentAutopilot property
  - Use MechJebModuleAscentMenu instead of AscentGuidance
  - Handle Users property with PascalCase fallback

- Fix MechJebRPM.cs:
  - Update module check from MechJebModuleAscentAutopilot to MechJebModuleAscentSettings
  - Fix Force Roll menu index (5->6) for Home button adjustment
This adds comprehensive IVA menu support for MechJeb 2.15.1, achieving
near-100% feature parity with MJ's IMGUI interface.

New files:
- MechJebProxy.cs: Complete reflection-based wrapper for MJ 2.15.1
  - 367 public static methods covering all MJ autopilots
  - Ascent, landing, rendezvous, docking autopilots
  - Attitude control, thrust limiting, staging control
  - Maneuver planner operations
  - All use PascalCase field names for MJ 2.15.1 compatibility

- MechJebRPMMenu.cs: Enhanced IVA text menu system
  - Full ascent guidance menus with all parameters
  - Landing guidance with target selection
  - Rendezvous and docking autopilot controls
  - Maneuver planner with orbit operations
  - Smart A.S.S. attitude control
  - Thrust and staging controller settings

Modified:
- OrbitExtensions.cs: Enable orbit helper methods needed by new menus
  (SwappedOrbitalVelocityAtUT, Radius, NextApoapsisTime, etc.)

This is an optional enhancement that builds on the basic MJ 2.15.1
integration. Users who only need basic functionality can use the
mechjeb-2.15.1-integration branch instead.
Local User and others added 4 commits January 22, 2026 14:36
- Fixed checkbox display issue: RPM interprets [text] as color tags, so
  square brackets were being stripped. Now using green color highlighting
  via isSelected property instead of checkbox characters.

- Fixed ClickProcessor alias for menu button interaction

- Fixed Advanced Transfer maneuver node creation - now checks if
  computation is finished before attempting to create nodes

- Added try-catch protection in UpdateTrackedItems to prevent exceptions
  from breaking label updates

- Disabled old MechJebRPM.csproj to prevent DLL locking issues during build

- Radio buttons (Rendezvous/Transfer, Lowest DV/ASAP) now use color
  highlighting for selection state
PAGEHANDLER:NEEDS[MechJeb2]
{
name = MechJebRPM
name = MechJebRPMMenu
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like you created a new page handler (MechJebRPMMenu). Is there any reason to keep the old one around?

namespace JSI
{
class JSINumericInput : InternalModule
public class JSINumericInput : InternalModule
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are these changes needed or related at all?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like most of this should be in JSIMechJeb.cs? I suppose this is fine, until MJ stuff is separated out into its own DLL.

@JonnyOThan JonnyOThan changed the base branch from master to mechjeb March 30, 2026 14:57
@JonnyOThan JonnyOThan merged commit 8b450dd into FirstPersonKSP:mechjeb Mar 30, 2026
0 of 2 checks passed
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.

2 participants