Page 1 of 1

LuaEntity function to query CURRENT pumping speed (for pumps and offshore pumps)

Posted: Mon May 12, 2025 1:14 pm
by kat328
TL;DR
A function for LuaEntity to query the current pumping speed for pumps and offshore pumps.
What?
Currently, there is a function that queries the maximum pumping speed of a LuaEntityPrototype, but there is no function to query the CURRENT pumping speed of an offshore pump or a pump.

Image
Why?
It would be available for modders.

Thank you!

Re: LuaEntity function to query CURRENT pumping speed (for pumps and offshore pumps)

Posted: Fri Jul 25, 2025 2:38 pm
by thousand_x
+1
This is currently blocking me with mod progress and it seems pointless to engineer alternative / approximate solutions when this variable seems to just exist in the game but is not accessible for the mod. Please, add it, if it is as simple as it looks.

Re: LuaEntity function to query CURRENT pumping speed (for pumps and offshore pumps)

Posted: Wed Jul 30, 2025 6:38 pm
by Quezler
This got added in 2.0.61: https://lua-api.factorio.com/latest/cla ... _last_tick

(the value shown in the sidebar is pumped_last_tick times 60, so despite what the naming might suggest its the value you are after)

Re: LuaEntity function to query CURRENT pumping speed (for pumps and offshore pumps)

Posted: Thu Jul 31, 2025 7:18 pm
by thousand_x
Thank you!