Code: Select all
pipe_connections =
{
{
position = {0, -1},
max_underground_distance = 1
},
{
position = {0, 1},
max_underground_distance = 1
},
},
Code: Select all
pipe_connections =
{
{
position = {0, -1},
max_underground_distance = 1
},
{
position = {0, 1},
max_underground_distance = 1
},
},
Code: Select all
{
type = "pipe-to-ground",
name = "underground-pipe",
icon = "__pipe-dream__/graphics/icons/underground-pipe.png",
flags = {"placeable-neutral", "player-creation"},
minable = {hardness = 0.2, mining_time = 0.75, result = "underground-pipe"},
max_health = 50,
corpse = "small-remnants",
resistances =
{
{
type = "fire",
percent = 80
}
},
collision_box = {{-0.1, -0.1}, {0.1, 0.1}},
selection_box = {{-0.5, -0.5}, {0.5, 0.5}},
fluid_box =
{
base_area = 1,
-- pipe_covers = pipecoverspictures(),
pipe_connections =
{
{
position = {0, -1},
max_underground_distance = 1
},
{
position = {0, 1},
max_underground_distance = 1
},
},
},
underground_sprite =
{
filename = "__core__/graphics/arrows/underground-lines.png",
priority = "high",
width = 32,
height = 32
},
pictures =
{
up =
{
filename = "__pipe-dream__/graphics/entity/underground-pipe/underground-pipe-updown.png",
priority = "high",
width = 44,
height = 32 --, shift = {0.10, -0.04}
},
down =
{
filename = "__pipe-dream__/graphics/entity/underground-pipe/underground-pipe-updown.png",
priority = "high",
width = 40,
height = 32 --, shift = {0.05, 0}
},
left =
{
filename = "__pipe-dream__/graphics/entity/underground-pipe/underground-pipe-leftright.png",
priority = "high",
width = 32,
height = 42 --, shift = {-0.12, 0.1}
},
right =
{
filename = "__pipe-dream__/graphics/entity/underground-pipe/underground-pipe-leftright.png",
priority = "high",
width = 32,
height = 40 --, shift = {0.1, 0.1}
},
}
},
{
type = "pipe-to-ground",
name = "pipe-to-ground-tap",
icon = "__base__/graphics/entity/pipe/pipe-cross.png",
flags = {"placeable-neutral", "player-creation"},
minable = {hardness = 0.2, mining_time = 0.75, result = "pipe-to-ground-tap"},
max_health = 50,
corpse = "small-remnants",
resistances =
{
{
type = "fire",
percent = 80
}
},
collision_box = {{-0.3, -0.3}, {0.3, 0.3}},
selection_box = {{-0.5, -0.5}, {0.5, 0.5}},
fluid_box =
{
base_area = 1,
pipe_covers = pipecoverspictures(),
pipe_connections =
{
{
position = {0, -1},
max_underground_distance = 5
},
{
position = {1, 0},
max_underground_distance = 5
},
{
position = {0, 1},
max_underground_distance = 5
},
{
position = {-1, 0},
max_underground_distance = 5
},
{ position = {0, -1} },
{ position = {1, 0} },
{ position = {0, 1} },
{ position = {-1, 0} }
},
},
underground_sprite =
{
filename = "__core__/graphics/arrows/underground-lines.png",
priority = "high",
width = 32,
height = 32
},
pictures =
{
up =
{
filename = "__base__/graphics/entity/pipe/pipe-cross.png",
priority = "high",
width = 40,
height = 40
},
down =
{
filename = "__base__/graphics/entity/pipe/pipe-cross.png",
priority = "high",
width = 40,
height = 40
},
left =
{
filename = "__base__/graphics/entity/pipe/pipe-cross.png",
priority = "high",
width = 40,
height = 40
},
right =
{
filename = "__base__/graphics/entity/pipe/pipe-cross.png",
priority = "high",
width = 40,
height = 40
},
},
},
My guess would be that now (0.9.1) it doesn't work only when the other connection is in the same direction as from where you are connection. The trick was that when the code is searching for the other side of the pipe and encounters a pipe that has opposite pipe-to-ground connection than it expects then it stops searching. This has been changed that it still looks at other connections of that entity and then stops.sparr wrote:I just discovered that *sometimes* the second connection works. I can't discern a pattern, although it always works or doesn't work in the same situation, so it's consistent.