[raiguard][2.0.11] LuaEntity::get_fluid returns wrong value

User avatar
hgschmie
Long Handed Inserter
Long Handed Inserter
Posts: 73
Joined: Tue Feb 06, 2024 5:18 am
Contact:

[raiguard][2.0.11] LuaEntity::get_fluid returns wrong value

Post by hgschmie »

Consider this storage tank:
Screenshot 2024-10-26 at 14.23.55.png
Screenshot 2024-10-26 at 14.23.55.png (1.88 MiB) Viewed 222 times
Calling `get_fluid(1)` on the entity returns 26,000, not 25,000 :
Screenshot 2024-10-26 at 14.26.06.png
Screenshot 2024-10-26 at 14.26.06.png (216.51 KiB) Viewed 222 times
It seems that the call returns the contents of the pipeline, not of the storage tank.
przemo1232
Burner Inserter
Burner Inserter
Posts: 6
Joined: Fri Oct 18, 2024 9:48 am
Contact:

Re: [2.0.11] LuaEntity::get_fluid returns wrong value

Post by przemo1232 »

Same thing happens when calling fluidbox methods, entity.fluidbox.get_capacity(1) for example returns the capacity of the entire pipeline.
Similarly, setting the entity.fluidbox[1] field sets the amount for the entire pipeline instead of just the entity's fluidbox
Post Reply

Return to “Assigned”