LuaForce had attributes changed to methods for get_item_production_statistics, get_fluid_production_statics, get_kill_count_statistics, and get_entity_build_count_statistics so that they now take a surface as a parameter and return relevant LuaFlowStatistics for that surface only.
I'm requesting that the `surface` parameter for all 4 of these methods becomes optional and without it, a global LuaFlowStatistics object be returned. This would be similar to the production screen UI with its checkbox to enable "Global statistics".
[2.0.6] Global LuaForce get_*_statistics
- Stringweasel
- Filter Inserter
- Posts: 416
- Joined: Thu Apr 27, 2017 8:22 pm
- Contact:
Re: [2.0.6] Global LuaForce get_*_statistics
+1 would be useful for Better Victory Screen which has to keep track of many things. And having to add it all in Lua will be a little slower.
Alt-F4 Author | Factorio Modder
My Mods: Hall of Fame | Better Victory Screen | Fluidic Power | Biter Power | Space Spidertron | Spidertron Dock |Weasel's Demolition Derby
Official Contributor to Space Exploration
My Mods: Hall of Fame | Better Victory Screen | Fluidic Power | Biter Power | Space Spidertron | Spidertron Dock |
Official Contributor to Space Exploration
Re: [2.0.6] Global LuaForce get_*_statistics
+1 would be useful for Milestones
Re: [2.0.6] Global LuaForce get_*_statistics
Just FYI: there is no global statistics and the GUI simply goes over all of them and sums them together each frame it renders. That works fine for reading because "sum all" doesn't care if a given surface exists or not. But, it wouldn't work for the Lua API where you can also write/modify/add because it would either do nothing, error, or write to every surface in the game (that exists? or just the ones that have statistics at that point in time?)
So I'm going to say this is a won't-implement.
So I'm going to say this is a won't-implement.
If you want to get ahold of me I'm almost always on Discord.