(Resolved) Trying to set_fluid()

Place to get help with not working mods / modding interface.
0n0w1c
Inserter
Inserter
Posts: 38
Joined: Sat Sep 09, 2023 1:43 pm
Contact:

(Resolved) Trying to set_fluid()

Post 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?
Last edited by 0n0w1c on Sun Nov 03, 2024 12:31 am, edited 1 time in total.
0n0w1c
Inserter
Inserter
Posts: 38
Joined: Sat Sep 09, 2023 1:43 pm
Contact:

Re: Trying to set_fluid()

Post 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" })
Post Reply

Return to “Modding help”