I managed to implement an on/off switch for depletable yields. Nothing listens to the setting yet, but it's there, which is a start.
Code:
<GameOptionInfo>
<Type>GAMEOPTION_DEPLETABLE_YIELDS</Type>
<Description>TXT_KEY_GAME_OPTION_DEPLETABLE_YIELDS</Description>
<Help>TXT_KEY_GAME_OPTION_DEPLETABLE_YIELDS_HELP</Help>
<bDefault>0</bDefault>
<bVisible>1</bVisible>
</GameOptionInfo>
bDefault tells what the setting will be if you click "play now" as well as starting value in custom games
bVisible tells if the player is able to use the non-default setting.
Looks like we have the XML setup, which allows us to easily ban the feature from a stable release as well as easily use it by default for development.
For the record, it is actually not that hard to add game options. All you have to do is to add it to CIV4GameOptionInfos.xml, enum GameOptionTypes and CyEnumInferface.cpp. It is then accessed by CvGame::isOption(enum value) and is accessible to python. Now all we need to figure out is how to give the option to change the options if you click play now and we are free to make the game configurable.
Btw all game options are automatically included in savegames. It's not a JIT array through and it takes custom code not to break savegames. Rather than trying to save old savegames, I will instead intentionally break them and clean up savegame code now that they break anyway. Because I will break savegames over and over, I will make a dedicated branch just for this task.
EDIT: we need a single name for prospecting/depletable yields. It would appear that there are at least 3 names for it so far and that was even before I came up with the "depletable yields" name. While the names are not downright misleading, it would be way better if we could have a standard name for each feature as finding all the code for that feature largely depends on searching for "/// name".