
| get_input_count(id) | → uint64 or double | Gets the total input count for a given prototype. |
Gets the total input count for a given prototype. | ||
| set_input_count(id, count) | Sets the total input count for a given prototype. | |
Sets the total input count for a given prototype. | ||
| get_output_count(id) | → uint64 or double | Gets the total output count for a given prototype. |
Gets the total output count for a given prototype. | ||
| set_output_count(id, count) | Sets the total output count for a given prototype. | |
Sets the total output count for a given prototype. | ||
| get_storage_count(id) | → uint64 or double | Gets the total storage count for a given prototype. |
Gets the total storage count for a given prototype. | ||
| set_storage_count(id, count) | Sets the total storage count for a given prototype. | |
Sets the total storage count for a given prototype. | ||
| get_flow_count{name=…, category=…, precision_index=…, sample_index?=…, count?=…} | → double | Gets the flow count value for the given time frame. [...] |
Gets the flow count value for the given time frame. [...] | ||
| on_flow(id, count) | Adds a value to this flow statistics. | |
Adds a value to this flow statistics. | ||
| clear() | Reset all the statistics data to 0. | |
Reset all the statistics data to 0. | ||
| input_counts | :: R dictionary[string → uint64 or double] | List of input counts indexed by prototype name. [...] |
List of input counts indexed by prototype name. [...] | ||
| output_counts | :: R dictionary[string → uint64 or double] | List of output counts indexed by prototype name. [...] |
List of output counts indexed by prototype name. [...] | ||
| storage_counts | :: R dictionary[string → uint64 or double] | List of storage counts indexed by prototype name. [...] |
List of storage counts indexed by prototype name. [...] | ||
| force | :: R LuaForce? | The force these statistics belong to. [...] |
The force these statistics belong to. [...] | ||
| valid | :: R boolean | Is this object valid? [...] |
Is this object valid? [...] | ||
| object_name | :: R string | The class name of this object. [...] |
The class name of this object. [...] | ||

| id | :: FlowStatisticsID | The prototype ID. |
The prototype ID. | ||
| count | :: uint64 or double | The new count. The type depends on the instance of the statistics. |
The new count. The type depends on the instance of the statistics. | ||

| id | :: FlowStatisticsID | The prototype ID. |
The prototype ID. | ||
| count | :: uint64 or double | The new count. The type depends on the instance of the statistics. |
The new count. The type depends on the instance of the statistics. | ||

| id | :: FlowStatisticsID | The prototype ID. |
The prototype ID. | ||
| count | :: uint64 or double | The new count. The type depends on the instance of the statistics. |
The new count. The type depends on the instance of the statistics. | ||

| name | :: FlowStatisticsID | The prototype ID. |
The prototype ID. | ||
| category | :: string | The statistics category to read from. Valid choices are |
The statistics category to read from. Valid choices are | ||
| precision_index | :: defines.flow_precision_index | The precision to read. |
The precision to read. | ||
| sample_index | :: uint16? | The sample index to read from within the precision range. If not provided, the entire precision range is read. Must be between 1 and 300 where 1 is the most recent sample and 300 is the oldest. |
The sample index to read from within the precision range. If not provided, the entire precision range is read. Must be between 1 and 300 where 1 is the most recent sample and 300 is the oldest. | ||
| count | :: boolean? | If true, the count of items/fluids/entities is returned instead of the per-time-frame value. |
If true, the count of items/fluids/entities is returned instead of the per-time-frame value. | ||

| id | :: FlowStatisticsID | The prototype ID. |
The prototype ID. | ||
| count | :: float | The count: positive or negative determines if the value goes in the input or output statistics. |
The count: positive or negative determines if the value goes in the input or output statistics. | ||