Mechjeb 2.15.1 full feature parity#171
Conversation
- 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.
- 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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
are these changes needed or related at all?
There was a problem hiding this comment.
no, these can be reverted if removing reflections.
There was a problem hiding this comment.
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.
|
@adventure-gpt are you an AI agent or LLM? This PR is impressive, though I wish I had been consulted about the general direction of these changes. It's a huge amount of code and the current architecture will be difficult to maintain. I probably could have pointed you in a better direction. Either way, I do really appreciate the effort here, and I'm working on getting these changes in a more maintainable form while preserving the functionality. |
|
Hey Jonny, Despite my name I am not, I am a real human person, however I do use them a lot and have a lot of projects that are tangentially related so... adventure-gpt is the name for me. Sorry this took me a while to see, I Haven't been playing KSP in a while, and I don't often log into this GH account. Thanks for taking the time to look at this! I'd be happy to make any changes desired, I know this set of changes is almost certainly kind of crap, so any guidance or design choices I'd be happy to try my best to adhere to. Again, Thank you so much for taking the time to look at this, I didn't really expect this to ever be accepted as a PR here, but I'd really love to see these features included in the mainline RPM, though definitely I agree they should be made more stable before being included in the mainline RPM. |
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
MechJebRPMMenu.cs: Enhanced IVA text menu system
Modified:
(SwappedOrbitalVelocityAtUT, Radius, NextApoapsisTime, etc.)