Page 1 of 1

(Resolved) Trying to set_fluid()

Posted: Sat Nov 02, 2024 11:29 pm
by 0n0w1c
I have an infinity-pipe defined as part of a composite entity created in an on_built_entity event handler.
After surface.create_entity, an attempt to activate it:

Code: Select all

my_infinity_pipe.set_fluid(1, { name = "water", amount = 100, temperature = 15 })
There is no error, yet the fluid is not set. If I set it via the gui, it begins to operate.
This looks like it should work, what am I missing?

I have tried with and without filter = "water" in the fluid_box definition.
I have tried gui_mode = "all" and "none"
How to activate the infinity-pipe after it is created?

Re: Trying to set_fluid()

Posted: Sun Nov 03, 2024 12:28 am
by 0n0w1c
Never fails, post and I find the answer shortly thereafter.

The correct call:

Code: Select all

my_infinity_pipe.set_infinity_pipe_filter({ name = "water", percentage = 1, temperature = 15, mode = "at-least" })