pipe-to-ground with no collision box gives connection error

Bugs that are actually features.
Post Reply
sparr
Smart Inserter
Smart Inserter
Posts: 1329
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

pipe-to-ground with no collision box gives connection error

Post by sparr »

When I set collision_box = {{0, 0}, {0, 0}} on a pipe-to-ground type entity and try to load it, I get the following error:

Code: Select all

Error while loading prototype "underground-pipe": Invalid pipe connections specification for offset [0, -1].
My guess is that the connection code references the center of the collision box, and the center code doesn't like a zero-size collision box.

immibis
Filter Inserter
Filter Inserter
Posts: 303
Joined: Sun Mar 24, 2013 2:25 am
Contact:

Re: pipe-to-ground with no collision box gives connection er

Post by immibis »

It looks like the offset has to be on the north, south, east or west of the bounding box. With a zero size bounding box, there are no valid offsets. It does this to calculate the direction the pipe is facing. Maybe in the future there'll be a way to specify the direction instead of making Factorio compute it.

Edit: If you want this, make a topic in modding interface requests.

kovarex
Factorio Staff
Factorio Staff
Posts: 8078
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: pipe-to-ground with no collision box gives connection er

Post by kovarex »

Why do you want 0 collision box anyway? If you want it to not collide with buildings, change the collision mask.

sparr
Smart Inserter
Smart Inserter
Posts: 1329
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Re: pipe-to-ground with no collision box gives connection er

Post by sparr »

Actually, I wanted it to not collide with the player. I didn't even realize that not colliding with buildings was an option! The collision_mask is something I had overlooked because it is used in so few places. Setting it to empty seems to have at least the desired effect. I will have to investigate what each of the collision_mask layers do so I can figure out what to put there.

Post Reply

Return to “Not a bug”