Factorio Prototype DocsVersion 1.1.107

ElectricEnergySource :: struct Example code

Inherits from BaseEnergySource

Properties

type optional :: "electric"

This is only loaded, and mandatory if the energy source can be loaded as multiple energy source types.

This is only loaded, and mandatory if the energy source can be loaded as multiple energy source types.

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 :: 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.

Properties

type :: "electric" optional

This is only loaded, and mandatory if the energy source can be loaded as multiple energy source types.

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 = 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"
}

Prototypes

Types