Page 1 of 1

[2.0.16] LuaEntity.get_fluid_segment_id does not work for assembling machines.

Posted: Fri Nov 08, 2024 10:05 pm
by micromario
Greetings,

Running the following command works as-expected for pipes, storage tanks, and other machines with fluidboxes.

Code: Select all

/c game.print(game.player.selected.fluidbox.get_fluid_segment_id(1))
11-08-2024, 16-03-50.png
11-08-2024, 16-03-50.png (1.45 MiB) Viewed 397 times
However it fails when running the game command on an assembling prototype. No matter what it always returns

Code: Select all

nil
11-08-2024, 16-04-33.png
11-08-2024, 16-04-33.png (724.83 KiB) Viewed 397 times
factorio-current.log
(15.15 KiB) Downloaded 38 times

Re: [2.0.16] LuaEntity.get_fluid_segment_id does not work for assembling machines.

Posted: Fri Nov 08, 2024 10:17 pm
by robot256
Does the assembler have a recipe set? IIRC the fluidbox doesn't get activated and connected until the recipe demands it.

Re: [2.0.16] LuaEntity.get_fluid_segment_id does not work for assembling machines.

Posted: Fri Nov 08, 2024 10:24 pm
by micromario
Yes. The recipe is set to "advanced oil processing"

Re: [2.0.16] LuaEntity.get_fluid_segment_id does not work for assembling machines.

Posted: Sat Nov 09, 2024 12:16 am
by raiguard
This is not a bug. It doesn't return an ID for the assembling machine because the assembling machine's fluid boxes aren't part of a segment.