Sulfur Production from Oils


Changes which fluids sulfur production uses and balances the efficiency of them towards heavy oil. By itself on Factorio 0.17.60 or later, it merely adds options to produce sulfur from heavy & light oil, with heavy oil having the best efficiency and petroleum gas the worst. When used in conjunction with the 'Pre 0.17.60 Oil' mod, it makes it so sulfur production comes exclusively from heavy oil (with a setting to enable light and gas). Concept is to move uses of the oil byproduct fluids around so the system is less demanding on petroleum gas and gives outlets for everything else.

1 year, 5 months ago
0.17
627

b Productivity

1 year, 5 months ago
(updated 1 year, 5 months ago)

Light and heavy oil to sulfur can't use productivity modules.

Add this to the end of your data-update.lua to register the new recipes with productivity modules.

for k,v in pairs(data.raw.module) do
  if v.limitation then  
    if data.raw["recipe"]["heavy-sulfur"] then 
      table.insert(v.limitation, "heavy-sulfur") 
    end
    if data.raw["recipe"]["light-sulfur"] then 
      table.insert(v.limitation, "light-sulfur") 
    end
  end
end

 
PS: You toggle light-sulfur on and off so often it's hard to make changes to your code.

1 year, 5 months ago

I won’t be able to take a look until Monday, but the light and heavy recipes should be direct copies of the vanilla recipe.

1 year, 5 months ago

Productivity module restrictions are in a table separate from recipes.
You have to whitelist each recipe by name in it for prod modules to be allowed.

1 year, 5 months ago

Ah, ok. Didn’t know that existed.

New response