Page 1 of 1

[0.17.60] Fluid box collision problem, possibly.

Posted: Fri Aug 02, 2019 10:34 pm
by Adamo
Here is some code that makes a new boiler out of the old boiler and adds a pipe to it:

Code: Select all

gf_boiler_entity = util.table.deepcopy(data.raw.boiler.boiler)
gf_boiler_entity.name = "adamo-carbon-gas-fired-boiler"
gf_boiler_entity.icon = "__adamo-carbon__/graphics/icons/gas-fired-boiler.png"
gf_boiler_entity.icon_size = 32
gf_boiler_entity.minable.result = "adamo-carbon-gas-fired-boiler"
gf_boiler_entity.energy_source = {
	type = "fluid",
	fluid_box = {
		base_area = 1,
		height = 2,
		base_level = -1,
		pipe_covers = pipecoverspictures(),
		pipe_picture = assembler1pipepictures(),
		pipe_connections = {
			{type = "input", position = {0, 1.5}},
		},
	},
	burns_fluid = true,
	scale_fluid_usage = true,
	effectivity = 1,
	emissions_per_minute = 30,
	smoke = {{
			name = "smoke",
			north_position = util.by_pixel(-38, -47.5),
			south_position = util.by_pixel(38.5, -32),
			east_position = util.by_pixel(20, -70),
			west_position = util.by_pixel(-19, -8.5),
			frequency = 15,
			starting_vertical_speed = 0.3,
			starting_frame_deviation = 0
	}},
	light_flicker = {
		--minimum_intensity = 0.8,
		--maximum_intensity = 1,
		--color = {r=0.75,g=0.1,b=0.1,a=0.5},
		color = {r=1,g=0.5,b=0.5,a=0.5},
		minimum_light_size = 0.1,
		light_intensity_to_size_coefficient = 1
	}
}
This code causes an error due to a fluid box overlap, but the other positions are not the same:

Code: Select all

    output_fluid_box =
    {
      base_area = 1,
      height = 2,
      base_level = 1,
      pipe_covers = pipecoverspictures(),
      pipe_connections =
      {
        {type = "output", position = {0, -1.5}}
      },
      production_type = "output",
      filter = "steam"
    },

Code: Select all

    fluid_box =
    {
      base_area = 1,
      height = 2,
      base_level = -1,
      pipe_covers = pipecoverspictures(),
      pipe_connections =
      {
        {type = "input-output", position = {-2, 0.5}},
        {type = "input-output", position = {2, 0.5}}
      },
      production_type = "input-output",
      filter = "water"
    },

Re: [0.17.60] Fluid box collision problem, possibly.

Posted: Mon Aug 05, 2019 2:30 pm
by Klonan
Can you attach a whole prototype?

Re: [0.17.60] Fluid box collision problem, possibly.

Posted: Mon Aug 05, 2019 4:47 pm
by Rseding91
I tested the limited version of the prototype in the first text snippet and it seems to work in the next version of 0.17. But, if you could do what Klonan said and post a full prototype I can test that it works correctly.