local BioInd = require('common')('Bio_Industries_2')

local ICONPATH = BioInd.modRoot .. "/graphics/icons/"
local ICONPATH_E = BioInd.modRoot .. "/graphics/icons/entity/"


-- Changed for 0.18.29: We always want to make advanced fertilizer, so we need to
-- unlock the bio-reactor and the most basic recipe for algae biomass even if
-- BI.Settings.BI_Bio_Fuel has been turned off!
data:extend({
  --- BioReactor
  {
    type = "item",
    name = "bi-bio-reactor",
    icon = ICONPATH_E .. "bioreactor.png",
    icon_size = 64,
    icons = {
      {
        icon = ICONPATH_E .. "bioreactor.png",
        icon_size = 64,
      }
    },
    subgroup = "production-machine",
    order = "z[bi]-a[bi-bio-reactor]",
    place_result = "bi-bio-reactor",
    stack_size = 10
  },
})


if BI.Settings.BI_Bio_Fuel then
  data:extend({
    ---- Cellulose
    {
      type = "item",
      name = "bi-cellulose",
      icon = ICONPATH .. "cellulose.png",
      icon_size = 64,
      icons = {
        {
          icon = ICONPATH .. "cellulose.png",
          icon_size = 64,
        }
      },
      subgroup = "intermediate-product",
      order = "b[cellulose]",
      stack_size = 200
    },

                                                                                                                      --- Bio Boiler
    {
      type = "item",
      name = "bi-bio-boiler",
      icon = ICONPATH_E .. "bio_boiler.png",
      icon_size = 64,
      icons = {
        {
          icon = ICONPATH_E .. "bio_boiler.png",
          icon_size = 64,
        }
      },
      subgroup = "energy",
      order = "b[steam-power]-b[boiler]",
      place_result = "bi-bio-boiler",
      stack_size = 50
    },
  })
end
