Factorio.com|Forums|Wiki|Mod Portal|API Docs Prototype|Runtime|Auxiliary

# Factorio Prototype Docs Version 2.0.7

## ElectricEnergySource :: struct Example code

Inherits from BaseEnergySource

## Properties

- default
- sorted

type | :: `"electric"` |
buffer_capacity optional | :: Energy | How much energy this entity can hold.
How much energy this entity can hold.
usage_priority | :: ElectricUsagePriority |
input_flow_limit optional | :: Energy | The rate at which energy can be taken, from the network, to refill the energy buffer. [...]
The rate at which energy can be taken, from the network, to refill the energy buffer. [...]
output_flow_limit optional | :: Energy | The rate at which energy can be provided, to the network, from the energy buffer. [...]
The rate at which energy can be provided, to the network, from the energy buffer. [...]
drain optional | :: Energy | How much energy (per second) will be continuously removed from the energy buffer. [...]
How much energy (per second) will be continuously removed from the energy buffer. [...]

Inherited from BaseEnergySource

emissions_per_minute optional | :: dictionary[AirbornePollutantID → double] | The pollution an entity emits per minute at full energy consumption. [...]
The pollution an entity emits per minute at full energy consumption. [...]
render_no_power_icon optional | :: bool | Whether to render the "no power" icon if the entity is low on power. [...]
Whether to render the "no power" icon if the entity is low on power. [...]
render_no_network_icon optional | :: bool | Whether to render the "no network" icon if the entity is not connected to an electric network.
Whether to render the "no network" icon if the entity is not connected to an electric network.

type | :: `"electric"` |
usage_priority | :: ElectricUsagePriority |
buffer_capacity optional | :: Energy | How much energy this entity can hold.
How much energy this entity can hold.
drain optional | :: Energy | How much energy (per second) will be continuously removed from the energy buffer. [...]
How much energy (per second) will be continuously removed from the energy buffer. [...]
input_flow_limit optional | :: Energy | The rate at which energy can be taken, from the network, to refill the energy buffer. [...]
The rate at which energy can be taken, from the network, to refill the energy buffer. [...]
output_flow_limit optional | :: Energy | The rate at which energy can be provided, to the network, from the energy buffer. [...]
The rate at which energy can be provided, to the network, from the energy buffer. [...]

Inherited from BaseEnergySource

emissions_per_minute optional | :: dictionary[AirbornePollutantID → double] | The pollution an entity emits per minute at full energy consumption. [...]
The pollution an entity emits per minute at full energy consumption. [...]
render_no_network_icon optional | :: bool | Whether to render the "no network" icon if the entity is not connected to an electric network.
Whether to render the "no network" icon if the entity is not connected to an electric network.
render_no_power_icon optional | :: bool | Whether to render the "no power" icon if the entity is low on power. [...]
Whether to render the "no power" icon if the entity is low on power. [...]

## Properties

### type :: `"electric"`

### buffer_capacity :: Energy optional

How much energy this entity can hold.

#### Example

    buffer_capacity = "5MJ"

### usage_priority :: ElectricUsagePriority

#### Example

    usage_priority = "secondary-input"

### input_flow_limit :: Energy optional

Default: Max `double` value

The rate at which energy can be taken, from the network, to refill the energy buffer. `0` means no transfer.

#### Example

    input_flow_limit = "300kW"

### output_flow_limit :: Energy optional

Default: Max `double` value

The rate at which energy can be provided, to the network, from the energy buffer. `0` means no transfer.

#### Example

    output_flow_limit = "300kW"

### drain :: Energy optional

How much energy (per second) will be continuously removed from the energy buffer. In-game, this is shown in the tooltip as "Min. [Minimum] Consumption". Applied as a constant consumption-per-tick, even when the entity has the property active set to `false`.

#### Example

    drain = "1kW"

## Examples

    energy_source = -- energy source of oil pumpjack
    {
      type = "electric",
      emissions_per_minute = { pollution = 10 },
      usage_priority = "secondary-input"
    }

    energy_source = -- energy source of accumulator
    {
      type = "electric",
      buffer_capacity = "5MJ",
      usage_priority = "tertiary",
      input_flow_limit = "300kW",
      output_flow_limit = "300kW"
    }

    energy_source = -- energy source of steam engine
    {
      type = "electric",
      usage_priority = "secondary-output"
    }

Type used in

- AccumulatorPrototype::energy_source
- AmmoTurretPrototype::energy_source
- AsteroidCollectorPrototype::energy_source
- BeaconPrototype::energy_source
- BurnerGeneratorPrototype::energy_source
- CombinatorPrototype::energy_source
- ElectricEnergyInterfacePrototype::energy_source
- ElectricTurretPrototype::energy_source
- EnergySource
- EquipmentGhostPrototype::energy_source
- EquipmentPrototype::energy_source
- FusionGeneratorPrototype::energy_source
- FusionReactorPrototype::energy_source
- GeneratorPrototype::energy_source
- InventoryBonusEquipmentPrototype::energy_source
- LampPrototype::energy_source
- LightningAttractorPrototype::energy_source
- LoaderPrototype::energy_source
- ProgrammableSpeakerPrototype::energy_source
- RoboportPrototype::energy_source
- SolarPanelPrototype::energy_source