[2.0.6] Global LuaForce get_*_statistics

Things that we aren't going to implement
BurninSun
Long Handed Inserter
Long Handed Inserter
Posts: 57
Joined: Fri Mar 16, 2018 4:54 am
Contact:

[2.0.6] Global LuaForce get_*_statistics

Post by BurninSun »

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".
User avatar
Stringweasel
Filter Inserter
Filter Inserter
Posts: 416
Joined: Thu Apr 27, 2017 8:22 pm
Contact:

Re: [2.0.6] Global LuaForce get_*_statistics

Post by Stringweasel »

+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
User avatar
Wiwiweb
Long Handed Inserter
Long Handed Inserter
Posts: 77
Joined: Sat May 08, 2021 2:36 am
Contact:

Re: [2.0.6] Global LuaForce get_*_statistics

Post by Wiwiweb »

+1 would be useful for Milestones
Rseding91
Factorio Staff
Factorio Staff
Posts: 14286
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [2.0.6] Global LuaForce get_*_statistics

Post by Rseding91 »

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.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Won't implement”