Page 1 of 1

Furnace not working with Fluid and Items

Posted: Wed Jan 28, 2015 8:47 am
by Dysoch
I the metallurgy part of DyTech i have a blast furnace that will smelt the ores into liquid metals with the help of lava.

Lava gets added into the furnace just normally, but the ores can never be put in, either by hand or with inserter.
here are the definitions:
Entity:

Code: Select all

    type = "furnace",
    name = "blast-furnace",
	icon = "__MAIN-DyTech-Machine__/graphics/metallurgy/icons/blast-furnace.png",
    flags = {"placeable-neutral", "player-creation"},
    minable = {hardness = 0.2, mining_time = 0.5, result = "blast-furnace"},
	collision_box = {{-2.4, -2.4}, {2.4, 2.4}},
    selection_box = {{-2.5, -2.5}, {2.5, 2.5}},
    light = {intensity = 2, size = 25},
    crafting_categories = {"blast-furnace"},
    max_health = 1500,
    energy_usage = "150kW",
	crafting_speed = 1,
    module_slots = 5,
    allowed_effects = {"consumption", "speed", "pollution"},
    source_inventory_size = 2,
    result_inventory_size = 1,
    energy_source =
    {
      type = "electric",
      usage_priority = "secondary-input",
      emissions = 0.005
    },
    working_sound =
    {
      sound =
      {
        filename = "__base__/sound/electric-furnace.ogg",
        volume = 0.7
      },
      apparent_volume = 1.5
    },
    animation =
    {
      filename = "__MAIN-DyTech-Machine__/graphics/metallurgy/entity/metallurgy-machines/blast-furnace.png",
      priority = "medium",
      width = 212,
      height = 180,
      line_length = 5,
      frame_count = 16,
	  shift = {0.8, 0.18}
    },
	fluid_boxes =
	{
      {
        production_type = "output",
        --pipe_covers = pipecoverspictures(),
        base_area = 100,
        base_level = 1,
        pipe_connections = {{ type="output", position = {-3, 1} }}
      }, 
	  {
        production_type = "output",
        --pipe_covers = pipecoverspictures(),
        base_area = 100,
        base_level = 1,
        pipe_connections = {{ type="output", position = {-3, -1} }}
      }, 
      {
        production_type = "output",
        --pipe_covers = pipecoverspictures(),
        base_area = 100,
        base_level = 1,
        pipe_connections = {{ type="output", position = {3,1} }}
      }, 
	  {
        production_type = "output",
        --pipe_covers = pipecoverspictures(),
        base_area = 100,
        base_level = 1,
        pipe_connections = {{ type="output", position = {3,-1} }}
      }, 
      {
        production_type = "input",
        --pipe_covers = pipecoverspictures(),
        base_area = 100,
        base_level = -1,
        pipe_connections = {{ type="input", position = {1, -3} }}
      }, 
	  {
        production_type = "input",
        --pipe_covers = pipecoverspictures(),
        base_area = 100,
        base_level = -1,
        pipe_connections = {{ type="input", position = {-1, -3} }}
      }, 
      {
        production_type = "input",
        --pipe_covers = pipecoverspictures(),
        base_area = 100,
        base_level = -1,
        pipe_connections = {{ type="input", position = {1,3} }}
      }, 
	  {
        production_type = "input",
        --pipe_covers = pipecoverspictures(),
        base_area = 100,
        base_level = -1,
        pipe_connections = {{ type="input", position = {-1,3} }}
      },
	},
Recipe:

Code: Select all

  {
    type = "recipe",
    name = "metallurgy-copper-smelt",
	enabled = false,
	category = "blast-furnace",
    energy_required = 5,
    ingredients =
    {
      {type="item", name="copper-ore", amount=1},
	  {type="fluid", name="lava-1200", amount=0.2}
    },
    results = 
	{
      {type="fluid", name="molten-copper", amount=1}
    },
  },

Re: Furnace not working with Fluid and Items

Posted: Wed Jan 28, 2015 11:01 am
by kovarex
Furnace always accepts only recipes with 1 ingredient. So it is not really a bug, but a property of the system. To avoid the problem, you can just use assembling machine for that, where the recipe needs to be specified.

Re: Furnace not working with Fluid and Items

Posted: Wed Jan 28, 2015 11:12 am
by dee-
I see the convenience in furnances having no recipe, but isn't this a conceptual break to assembly machines / refineries?
They all do the same: move some items to local input storage, reduce the input storage, wait a little, create output items in output local storage

Re: Furnace not working with Fluid and Items

Posted: Wed Jan 28, 2015 11:26 am
by Nemoricus
The only thing that furnaces do, that assemblers cannot, is that they can switch between recipes based on their inputs.

Re: Furnace not working with Fluid and Items

Posted: Wed Jan 28, 2015 12:00 pm
by kovarex
Nemoricus wrote:The only thing that furnaces do, that assemblers cannot, is that they can switch between recipes based on their inputs.
Yes, that is the only difference.

Because of this, furnace accepts only recipes with 1 input, so the logic doesn't become too complex.

Re: Furnace not working with Fluid and Items

Posted: Wed Jan 28, 2015 12:12 pm
by hoho
Would it be too complex to simply not allow furnace recipes that have identical inputs but different outputs?

In case like here where the furnace has half a dozen slots, just use the first recipe that can be made using the most different input materials that are currently inside the furnace.

E.g let's assume we have two recipes:
1) uses A B and C to create X
2) uses A and B to create Y

If a furnace has all of A, B and C, create X
If C is missing, create Y

I can see it could be a problem when one can't produce C fast enough and furnace wastes inputs by making unneeded Ys but I'd leave it up to modders to make sure their recipes don't cause such problems.

Re: Furnace not working with Fluid and Items

Posted: Wed Jan 28, 2015 12:19 pm
by kovarex
hoho wrote:Would it be too complex to simply not allow furnace recipes that have identical inputs but different outputs?

In case like here where the furnace has half a dozen slots, just use the first recipe that can be made using the most different input materials that are currently inside the furnace.

E.g let's assume we have two recipes:
1) uses A B and C to create X
2) uses A and B to create Y

If a furnace has all of A, B and C, create X
If C is missing, create Y

I can see it could be a problem when one can't produce C fast enough and furnace wastes inputs by making unneeded Ys but I'd leave it up to modders to make sure their recipes don't cause such problems.
Well it would be possible to do, but it would certainly not be a bug solving but a feature request.

Re: Furnace not working with Fluid and Items

Posted: Wed Jan 28, 2015 12:30 pm
by hoho
kovarex wrote:Well it would be possible to do, but it would certainly not be a bug solving but a feature request.
Should a new development proposal thread be made on the subject?

Re: Furnace not working with Fluid and Items

Posted: Wed Jan 28, 2015 12:34 pm
by kovarex
Yes could be.