[Twinsen][0.17.66] Storage tank entities ignore pipe_picture in their fluid boxes

This subforum contains all the issues which we already resolved.
Post Reply
User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2393
Joined: Fri Nov 06, 2015 7:41 pm

[Twinsen][0.17.66] Storage tank entities ignore pipe_picture in their fluid boxes

Post by Deadlock989 »

I'm trying to make a custom storage tank using left-over bits and pieces from other sprites. The originating model was a furnace type entity with fluid boxes including both pipe_picture and pipe_covers. On the furnace, pipe_picture is drawn correctly when a pipe connects to that pipe connection. With the storage tank, pipe_picture seems to be completely ignored:

Untitled.png
Untitled.png (350.67 KiB) Viewed 1555 times
I guess the vanilla tank doesn't need pipe_picture defined in its fluid box because it's all baked into the base sprite. But I expected that a fluid box is a fluid box is a fluid box.

The storage tank fluid_box definition:

Code: Select all

fluid_box = {
	base_area = 20,
	pipe_connections = {
		{ position = {0,-1} },
		{ position = {1,0} },
		{ position = {0,1} },
		{ position = {-1,0} },
	},
	pipe_covers = pipecoverspictures(),
	pipe_picture = {
		north = get_layer("machines/flare-stack-pipe-pictures", nil, nil, false, nil, nil, 46, 6, 41, 18, 128, 128, {0,1}),
		east = get_layer("machines/flare-stack-pipe-pictures", nil, nil, false, nil, nil, 2, 50, 94, 36, 128, 128, {-1,0}),
		south = get_layer("machines/flare-stack-pipe-pictures", nil, nil, false, nil, nil, 50, 26, 39, 70, 128, 128, {0,-1}), 
		west = get_layer("machines/flare-stack-pipe-pictures", nil, nil, false, nil, nil, 2, 50, 32, 36, 128, 128, {1,0}),
	},
	secondary_draw_orders = { north = -1 }
},
(The get_layer function fetches bits of the same overlay sprite that was used successfully on the furnace entity, the definition is identical).
"If Stalin had a good writeup on programming, would linking that be dangerous?"

Twinsen
Factorio Staff
Factorio Staff
Posts: 1240
Joined: Tue Sep 23, 2014 7:10 am
Contact:

Re: [Twinsen][0.17.66] Storage tank entities ignore pipe_picture in their fluid boxes

Post by Twinsen »

Indeed the storage tank was not drawing them since we never used it.

Should be fixed in Version: 0.17.67.
I only did some limited testing so let me know if it works as expected.

User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2393
Joined: Fri Nov 06, 2015 7:41 pm

Re: [Twinsen][0.17.66] Storage tank entities ignore pipe_picture in their fluid boxes

Post by Deadlock989 »

The behaviour of the pipe_pictures is much improved in .67, i.e. now works as expected - thanks for that.

There is something off with layers / render order, though. The pipe_pictures and pipe_covers interact poorly, being rendered on top of each other in a different order depending on location, entity orientation and zoom level:

Zoom level 2
Untitled1.png
Untitled1.png (105.5 KiB) Viewed 1393 times
Some other zoom level
Untitled2.png
Untitled2.png (50.28 KiB) Viewed 1393 times
If the stars align in the right way then every affected machine on the screen flickers back and forth when you highlight any one of them:

flicker.gif
flicker.gif (87.95 KiB) Viewed 1393 times
It makes me think of z-fighting. I have seen something like this before in Factorio but I can't put my finger on the bug report. In that case it was some odd interaction between pipes, base layers and working_animations, due to them being on the same render layers, and I think the fix was just to move one of them to a higher layer. If I find it I'll post the link.
"If Stalin had a good writeup on programming, would linking that be dangerous?"

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5030
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [Twinsen][0.17.66] Storage tank entities ignore pipe_picture in their fluid boxes

Post by Klonan »

Deadlock989 wrote:
Tue Sep 03, 2019 1:19 pm
The behaviour of the pipe_pictures is much improved in .67, i.e. now works as expected - thanks for that.

There is something off with layers / render order, though. The pipe_pictures and pipe_covers interact poorly, being rendered on top of each other in a different order depending on location, entity orientation and zoom level:
Can you make this as a new bug report

Post Reply

Return to “Resolved Problems and Bugs”