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

Bugs that are actually features.
User avatar
micromario
Fast Inserter
Fast Inserter
Posts: 116
Joined: Thu Apr 05, 2018 11:53 am
Contact:

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

Post 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 396 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 396 times
factorio-current.log
(15.15 KiB) Downloaded 38 times
robot256
Smart Inserter
Smart Inserter
Posts: 1242
Joined: Sun Mar 17, 2019 1:52 am
Contact:

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

Post by robot256 »

Does the assembler have a recipe set? IIRC the fluidbox doesn't get activated and connected until the recipe demands it.
My mods: Multiple Unit Train Control, RGB Pipes, Shipping Containers, Rocket Log, Smart Artillery Wagons.
Maintainer of Auto Deconstruct, Cargo Ships, Vehicle Wagon, Honk, Shortwave.
User avatar
micromario
Fast Inserter
Fast Inserter
Posts: 116
Joined: Thu Apr 05, 2018 11:53 am
Contact:

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

Post by micromario »

Yes. The recipe is set to "advanced oil processing"
User avatar
raiguard
Factorio Staff
Factorio Staff
Posts: 737
Joined: Wed Dec 13, 2017 8:29 pm
Contact:

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

Post 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.
Don't forget, you're here forever.
Post Reply

Return to “Not a bug”