Simple Seablock

by Aronson

Seablock based primarily around vanilla factorio techtree with minor changes

Overhaul
a month ago
1.1 - 2.1
4.27K
Environment Fluids

b Bob's Ores: Issue with furnace

a month ago
(updated a month ago)

Hi again! I've been testing the mod in various ways, and I found a compatibility issue with Bob's Ores! When ores are configured to yield a small amount of gems, this mod will attempt to do something similar for the charcoal recipe. However, the recipe won't actually work if furnaces are not configured to have room for at least two outputs, one for coal and one for diamonds! So if no other mod makes such a change to them (or replaces them with assembling machine clones like Furnace Recipe Selection does), you may have to write something like this in line 122 in mod-compat\data-updates\bobores.lua:

if settings.startup["bobmods-ores-gemsfromotherores"].value then
  for _, furnace in pairs(data.raw.furnace) do
    if furnace.result_inventory_size < 2 then -- preserves higher values set by other mods beforehand
      furnace.result_inventory_size = 2
    end
  end
  -- etc.
end

I have tested the solution, and it works. Although I guess that, if other mods add and modify furnaces at the later prototype stages, those mods may have to be added as optional dependencies so they load first, and the code may also have to be executed at the final prototype stage.

a month ago

If you want to make sure that only furnaces used for smelting are changed (and not any modded furnaces made to avoid recipe selection or reserved for their own set of recipes), you can add a check for the smelting crafting category:

-- Standard Lua function:
function TableContainsValue(table, element)
    for _, value in pairs(table) do
        if value == element then return true end
    end
    return false
end

if settings.startup["bobmods-ores-gemsfromotherores"].value then
  for _, furnace in pairs(data.raw.furnace) do
    if not TableContainsValue(furnace.crafting_categories, "smelting") then goto continue end
    if furnace.result_inventory_size >= 2 then goto continue end
    furnace.result_inventory_size = 2
    ::continue::
  end
  -- etc.
end

Hope you find it useful.

a month ago

1.10.1 fixes this. I don't really like the idea of giving a second output slot to all the furnaces to handle this, but after giving it some thought I can't really thinkg of a better approach. I even tried playing around with shared probability, but it seems like any recipe with more than one possible output gets blacklisted by furnaces without enough output slots, even if the recipe can't actually produce more than one result with a given operation.

a month ago

All right! Yeah, that kind of irks me too. It would seem that the furnace prototype is just odd like that.

New response