ClassLuaElectricSubNetworknew
Members
| get_accumulators_energy{name?=…, quality?=…} | → EnergyAndCapacityPair | Gets total energy stored inside of accumulators connected to the electric sub network. |
Gets total energy stored inside of accumulators connected to the electric sub network. | ||
| set_accumulators_energy{name?=…, quality?=…, energy=…, equalize?=…} | Changes energy stored inside of accumulators connected to the electric sub network. | |
Changes energy stored inside of accumulators connected to the electric sub network. | ||
| id | :: R uint32 | Unique identifier of this electric sub network. |
Unique identifier of this electric sub network. | ||
| parent_network | :: R LuaElectricNetwork | Parent network to this sub network. |
Parent network to this sub network. | ||
| neighbours | :: R array[LuaElectricSubNetwork] | List of sub networks that are directly connected to this sub network through power switches or because they span over electric poles placed on a surface with global network (all poles on a surface with global network are implicitly connected to global network making their networks neighbour of a global network). |
List of sub networks that are directly connected to this sub network through power switches or because they span over electric poles placed on a surface with global network (all poles on a surface with global network are implicitly connected to global network making their networks neighbour of a global network). | ||
| 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. [...] | ||
Methods
get_accumulators_energy{name?=…, quality?=…} → EnergyAndCapacityPair
Parameters
| name | :: EntityID? | When given, only accumulators of this prototype will be considered. |
When given, only accumulators of this prototype will be considered. | ||
| quality | :: QualityID? | When given, only accumulators of this quality will be considered. |
When given, only accumulators of this quality will be considered. | ||
set_accumulators_energy{name?=…, quality?=…, energy=…, equalize?=…}
Parameters
| name | :: EntityID? | When given, only accumulators of this prototype will be considered. |
When given, only accumulators of this prototype will be considered. | ||
| quality | :: QualityID? | When given, only accumulators of this quality will be considered. |
When given, only accumulators of this quality will be considered. | ||
| energy | :: double | New total energy to be set onto matching accumulators. |
New total energy to be set onto matching accumulators. | ||
| equalize | :: boolean? | Whether all accumulators should have the same charge ratio, regardless of whether that means discharging some of them. Defaults to |
Whether all accumulators should have the same charge ratio, regardless of whether that means discharging some of them. Defaults to | ||

