Description:
While experimenting with underground pipe connections, I found that pipes to ground require both the same connection_type and matching underground_collision_mask values in fluid_box.pipe_connections to connect. If the underground_collision_mask layers differ, the connection fails, even when the collision masks do not collide.
This behavior is undocumented and causes unexpected connection issues when customizing pipes to ground.
Steps to Reproduce:
- Create a custom pipe to ground with the following fluid_box.pipe_connections configuration:
Code: Select all
{ { direction = defines.direction.north, position = { 0, 0 } }, { connection_type = "underground", direction = defines.direction.south, position = { 0, 0 }, max_underground_distance = 10, connection_category = { "default" }, underground_collision_mask = { layers = { empty_space = true, lava_tile = true, water_tile = true } } } }
- Attempt to connect the custom pipe to ground to a base game pipe to ground.
- Observe that the connection fails.
- Modify the custom pipe by removing the water_tile layer from the underground_collision_mask in fluid_box.pipe_connections.
- Attempt the connection again and observe that it now works, even with the base game pipe to ground.
Expected Behavior:
Pipes to ground with compatible pipe_connections should connect regardless of differing underground_collision_mask values, as long as there is no collision.
Actual Behavior:
Pipes to ground fail to connect if the underground_collision_mask layers in fluid_box.pipe_connections differ, even when the connection_type matches and the collision masks do not collide.
Test Mod:
Attached is a test mod that demonstrates this issue. The custom pipe to ground includes a water_tile layer in the underground_collision_mask of fluid_box.pipe_connections, which prevents it from connecting to the base game pipe to ground. When the water_tile layer is removed, the connection works as expected.
Greetz,
Luzifer