Consider this storage tank:
Calling `get_fluid(1)` on the entity returns 26,000, not 25,000 :
It seems that the call returns the contents of the pipeline, not of the storage tank.
[raiguard][2.0.11] LuaEntity::get_fluid returns wrong value
-
- Burner Inserter
- Posts: 6
- Joined: Fri Oct 18, 2024 9:48 am
- Contact:
Re: [2.0.11] LuaEntity::get_fluid returns wrong value
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
Similarly, setting the entity.fluidbox[1] field sets the amount for the entire pipeline instead of just the entity's fluidbox
Re: [raiguard][2.0.11] LuaEntity::get_fluid returns wrong value
This is correct. The fluid buffer of the entity is merged with the segment, so it reports the segment values.
Don't forget, you're here forever.
Re: [raiguard][2.0.11] LuaEntity::get_fluid returns wrong value
Thanks for the explanation!
How does one determine how much fluid is inside an entity? It seems that any call only returns the amount in the whole fluidbox.
How does one determine how much fluid is inside an entity? It seems that any call only returns the amount in the whole fluidbox.