Cadmium


Scrub smelter fumes for cadmium and turn it into plated hardware for better engines, rockets and reactors. Dirtier air makes scrubbers work faster. Integrates with Brevven's BZ mods.

Content
a day ago
2.1
405
Manufacturing

g Failed to load mod

a month ago
(updated a month ago)

I've been playing Factorio with your mods (and many others), and got the following error message a while ago:

  37.773 Error ModManager.cpp:1782: Failed to load mod "cadmium": __cadmium__/integrations/space_age.lua:79: attempt to perform arithmetic on field 'amount' (a nil value)
stack traceback:
    __cadmium__/integrations/space_age.lua:79: in function 'vulcanus'
    __cadmium__/integrations/space_age.lua:176: in function '?'
    __cadmium__/integrations/init.lua:10: in function 'run'
    __cadmium__/data-final-fixes.lua:4: in main chunk

I've locally fixed this issue by adding checks to the integrations/space_age.lua starting on line 76 as follows, but you've been updating the mod often, and I can't keep up with fixing it every update, so I'm sharing:

  for _, ingredient in ipairs(recipe.ingredients) do
    if ingredient.amount then
      ingredient.amount = ingredient.amount * (ingredient.name == "calcite" and 3 or 2)
    end
  end
  for _, result in ipairs(recipe.results) do if result.amount then result.amount = result.amount * 2 end end

Please let me know if you're able to implement such a fix, so I don't have to manually do it myself every update.

a month ago

will take a look and fix

a month ago

This should be fixed in the updated version. Please note that factorio 2.1.22 is the minimum version now

New response