Barrels O' Fuel


any fluid with a fuel value can be used in barrel form

Content
9 months ago
1.1 - 2.0
748
Fluids Power

b Crash on startup

a month ago

Failed to load mods: barrels-o-fuel/data-final-fixes.lua:40: attempt to get length of field 'ingredients' (a nil value)
stack traceback:
barrels-o-fuel/data-final-fixes.lua:40: in function 'func'
barrels-o-fuel/data-final-fixes.lua:31: in function 'watch'
barrels-o-fuel/data-final-fixes.lua:37: in main chunk

15 days ago

I ran into this error as well, it happens when used with some other mods that add recipes without ingredients (I assume that behave like the trigger technologies?)

Anyway, there's a simple fix to skip recipes without ingredients, added line number 40:

  ⎿  Updated data-final-fixes.lua with 1 addition
       37    watch(data.raw["recipe"], function(recipes, name, recipe)
       38        if recipe == nil then return end
       39        if recipe.results == nil then return end
       40 +      if recipe.ingredients == nil then return end
       41        if #recipe.ingredients ~= 1 then return end
       42        if #recipe.results ~= 2 then return end

New response