Automatic Underground Pipe Connectors

by sparr

Automatically place a pipe when two undergrounds are placed at a corner or one space apart.

Utilities
6 months ago
1.0 - 2.0
30.2K

b Mod doesn't work under the elevated rails

a month ago

a month ago

That's interesting. I suspect there's something wrong with the detection of collision with the elevated rail. Thanks for the bug report. I'll look into this when I'm working on the mod again.

16 days ago

Had the same problem with Nullius wind turbines. Solved by adding checks to ignore the "airspace collision" entities to this segment:

    if placing_ghost then
        local found_entities = underground_surface.find_entities( { pipe_entity_definition.position, pipe_entity_definition.position } )
        for _,found_entity in pairs(found_entities) do
            if found_entity.type ~= "tile-ghost" and found_entity.name ~= "nullius-wind-collision"
            and found_entity.name ~= "nullius-wind-collision-vertical" and found_entity.name ~= "nullius-wind-collision-horizontal" then
                -- bail out because there's already something where we'd place a ghost
                return
            end
        end
    end

Probably the same thing is going on with elevated rails, where it does not ignore entities that the pipe wouldn't collide with. You can add the same check for them to your local version until someone posts the proper fix for this.

New response