Encapsulates statistic data for different parts of the game.
In the context of flow statistics, input
and output
describe on which side of the associated GUI the values are shown. Input values are shown on the left side, output values on the right side.
output
describes the item consumption numbers. The same goes for fluid consumption.output
describes how many of the force's entities were killed by enemies.input
describes the power consumption numbers.get_input_count(name) → uint64 or double | Gets the total input count for a given prototype. |
set_input_count(name, count) | Sets the total input count for a given prototype. |
get_output_count(name) → uint64 or double | Gets the total output count for a given prototype. |
set_output_count(name, count) | Sets the total output count for a given prototype. |
get_flow_count{name = …, input = …, precision_index = …, count = …} → double | Gets the flow count value for the given time frame. |
on_flow(name, count) | Adds a value to this flow statistics. |
clear() | Reset all the statistics data to 0. |
input_counts :: dictionary[string → uint64 or double] [R] | List of input counts indexed by prototype name. |
output_counts :: dictionary[string → uint64 or double] [R] | List of output counts indexed by prototype name. |
force :: LuaForce [R] | The force these statistics belong to or nil for pollution statistics. |
valid :: boolean [R] | Is this object valid? |
object_name :: string [R] | The class name of this object. |
help() → string | All methods and properties that this object supports. |
Gets the flow count value for the given time frame.
Reset all the statistics data to 0.
List of input counts indexed by prototype name. Represents the data that is shown on the left side of the GUI for the given statistics.
List of output counts indexed by prototype name. Represents the data that is shown on the right side of the GUI for the given statistics.
The force these statistics belong to or nil
for pollution statistics.