Requesting permission to release mod with Reflection to work around stock bug
There is a bug on the stock Settings screen which shows up if you have too many mods installed which add their own pages to the Settings screen. This can break a game if you happen to go into the settings screen when you have too many mods. The left scrolllist simply extends and doesn't properly limit itself, the OK and Cancel buttons are aligned with the bottom of the scrollist, so if you have too many, the OK and Cancel buttons are inaccessable, thereby breaking the game.
This mod is designed to work around the bug by disabling some of the settings pages before you go there.
The mod uses the public field GameParameters.ParameterTypes for most of the work. By trial and error I found that removing entries removed them from the settings screen.
The problem comes when going back to the game, apparently there is a private dictionary:
which seems to have entries removed when they aren't there in the ParameterTypes field. I wrote a little bit of Reflection to get this field which I was then able to repopulate properly.
If this field doesn't get repopulated, then mods can't find their settings pages
I wrote this because this bug has been around since at least 1.3.1, if not earlier.
Only issue I have seen so far is that when returning from the settings page to the game, there will be a short period when errors will be shown in the log because the field hasn't yet been repopulated. Once returned to the game, the errors go away.
The EULA and forum rules state that no private fields are to be used. I'm asking for permission to release this so that those people who have heavily modded games can use the settings pages without breaking the game.
I did an early release (before I knew about the reflection issue) which I pulled, but you can see the page here: https://forum.kerbalspaceprogram.com/index.php?/topic/173489-131-141-settings-master/