[2.0] Replacement for get_flow() ?

Place to get help with not working mods / modding interface.
User avatar
blargh2015
Inserter
Inserter
Posts: 37
Joined: Sun Jun 03, 2018 3:47 pm
Contact:

[2.0] Replacement for get_flow() ?

Post by blargh2015 »

I'm updating UtilizationMonitorBlargh https://mods.factorio.com/mod/UtilizationMonitorBlargh - it puts a percentage utilized on the corner of every building. One of the functions it used a lot for those calculations in 1.1 was get_flow, to determine pump rates, heat exchangers, basically anything with a fluid. That function was removed in 2.0.

Basically, I need to know how, via Lua, to get the current rate numbers as seen in the GUI. For example, in heat exchangers, there is either the consumption of water or the generation of steam (one used to be fluidbox 1, the other 2) - either one would do for that. i.e. in the GUI there "Consumption 6.0/s of 10.3/s" - I need the 6.0/s number (the 10.3 I can get from prototypes, although if there's an easier way to get that, that'd be great too).

For other elements I've figured out some hacky workarounds (guessing based on the fluidbox level, multiplied by the energy used ratio for most items), but there's nothing to work from that I'm finding for heat exchangers.
Post Reply

Return to “Modding help”