Page 1 of 1

Temperature of the fluid for `on_player_flushed_fluid`

Posted: Tue Oct 17, 2023 1:27 am
by Wiwiweb
What?
Simple enough, `on_player_flushed_fluid` returns the name of the fluid that was flushed, and the amount of fluid that was flushed. I would also like to know the temperature of the fluid that was flushed.

In the edge case of a single fluid system containing multiple temperatures of the same fluid, I'm ok with returning the average temperature, or even just the first temperature you find if that's easier.
Why?
It is for my mod Undeletable Fluids, I want to put the fluid back exactly the way it was.
The fact that I can't preserve temperature has caused some players to break their steam engines: https://mods.factorio.com/mod/pyhardmod ... 43effec55d

Thanks!

Re: Temperature of the fluid for `on_player_flushed_fluid`

Posted: Tue Oct 24, 2023 11:45 pm
by raiguard
Couldn't you just disable the flush fluid permission?

Re: Temperature of the fluid for `on_player_flushed_fluid`

Posted: Thu Nov 02, 2023 5:54 pm
by Wiwiweb
Depending on the mod, some fluids are allowed to be flushed, and some fluids are not. So I couldn't restrict the entire permission.