diff --git a/boblibrary/module-functions.lua b/boblibrary/module-functions.lua index 24fbfa9f6..ef1ce2941 100644 --- a/boblibrary/module-functions.lua +++ b/boblibrary/module-functions.lua @@ -14,7 +14,11 @@ end function bobmods.lib.module.add_productivity_limitation(recipe) if type(recipe) == "string" and data.raw.recipe[recipe] then for i, module in pairs(data.raw.module) do - if not bobmods.lib.module.excluded_prod_modules[module.name] and module.limitation and module.effect.productivity then + if + not bobmods.lib.module.excluded_prod_modules[module.name] + and module.limitation + and module.effect.productivity + then table.insert(module.limitation, recipe) end end