Good news: I have a fix.
In control.lua, line 154, the following code is present to detect if you can insert productivity modules into a machine:
if entity.type == "assembling-machine" and recipe and next(prototype.limitations) and not
prototype.limitations[recipe.name] then
player.print({"", "Can't use ", prototype.localised_name, " with recipe: ", recipe.localised_name})
valid_modules = false
end
The problem is that the author tries to check if a recipe is not in prototype.limitations by indexing it with the name: it doesn't check if recipe.name is in the array, it checks if it has a key with the name of recipe.name, which it never does since it is a normal array. So this check always evaluates to nil, and not nil is true, so you can't insert productivity modules into any machine. To fix this, I just iterated through the array normally to check if recipe.name is in there. If you replace the previous code with this code:
if entity.type == "assembling-machine" and recipe and next(prototype.limitations) then
valid_modules = false
for _, module_limitation in pairs(prototype.limitations) do
if recipe.name == module_limitation then
valid_modules = true
end
end
if valid_modules == false then
player.print({"", "Can't use ", prototype.localised_name, " with recipe: ", recipe.localised_name})
end
end
then it works. I have tested this personally.