Hi,
I wasn't terribly interested in removing the restrictions on placing quality and productivity modules in beacons however I was interested in adjusting just the maximum productivity bonus on machines.
Unfortunately, looking at your code, you have the adjustment of productivity dependent on unrestricting productivity. I personally added a setting to check whether or not to adjust maximum productivity and iterate through all the recipes, as you had, and set the maximum productivity bonus if allow productivity was true. If placed after the section of code where you adjust all recipes to allow productivity, you could separate the chunk of code that changes the maximum productivity into its own for statement and retain the functionality of both options if they're both set to true while increasing only the productivity of original unmodified recipes if not.
Would it be possible to incorporate this option and change the way you handle adjusting maximum productivity into your mod?
Thanks