Prototype/Accumulator: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(Has to be an electric energy source.)
(Removed old prototype docs)
 
(12 intermediate revisions by 3 users not shown)
Line 1: Line 1:
==Basics==
<div class="stub"><p>'''The prototype docs have moved to a new website with an improved format.''' This documentation page can now be found here: [https://lua-api.factorio.com/latest/prototypes/AccumulatorPrototype.html https://lua-api.factorio.com/latest/prototypes/AccumulatorPrototype.html]
Entity with energy source with specialised animation for charging/decharging.
Extends the [[Prototype/EntityWithHealth]]
== Usage in base==
*[[Accumulator]]
== Properties ==
=== energy_source ===
'''Type''': [[Types/EnergySource]]


The capacity of the energy source buffer specifies the capacity of the accumulator. Has to be an electric energy source.
</p><p>This wiki page is no longer updated and '''will be removed at some point in the future''', so please update your browser bookmarks or other links that sent you here. If you'd like to contribute to the new docs, you can leave your feedback [https://forums.factorio.com/viewforum.php?f=233 on the forums].</p></div>
 
=== picture ===
'''Type''': [[Types/Sprite]]
 
=== charge_animation ===
'''Type''': [[Types/Animation]]
 
=== charge_light ===
'''Type''': [[Types/LightDefinition]]
 
=== charge_cooldown ===
'''Type''': [[Types/uint16]]
 
Count of ticks to preserve the animation even when the charging ends.
 
Used to prevent rapid blinking of the accumulator with unstable need to use it.
 
=== discharge_animation ===
'''Type''': [[Types/Animation]]
 
=== discharge_light ===
'''Type''': [[Types/LightDefinition]]
 
=== discharge_cooldown ===
'''Type''': [[Types/uint16]]
 
How long (in ticks) the animation will last after discharge has been initialized.
 
=== circuit_wire_connection_point ===
'''Type''': [[Types/WireConnectionPoint]]
 
Defines how wires visually connect to this accumulator.
 
=== circuit_wire_max_distance ===
'''Type''': [[Types/double]]
 
'''Default''': 0
 
The maximum circuit wire distance for this accumulator.
 
=== circuit_connector_sprites ===
'''Type''': [[Types/CircuitConnectorSprites]]
 
The pictures displayed for circuit connections to this accumulator.
 
=== default_output_signal ===
'''Type''': [[Types/string]]
 
The name of the signal that is the default for when a accumulator is connected to the circuit network.
 
== Example ==
    {
      type = "accumulator",
      name = "basic-accumulator",
      icon = "__base__/graphics/icons/basic-accumulator.png",
      flags = {"placeable-neutral", "player-creation"},
      minable = {hardness = 0.2, mining_time = 0.5, result = "basic-accumulator"},
      max_health = 150,
      corpse = "medium-remnants",
      collision_box = {{-0.9, -0.9}, {0.9, 0.9}},
      selection_box = {{-1, -1}, {1, 1}},
      energy_source =
      {
        type = "electric",
        output_priority = "terciary",
        input_flow_limit = "300W",
        input_priority = "terciary",
        output_flow_limit = "300W",
        buffer_capacity = "5KJ"
      },
      picture =
      {
        filename = "__base__/graphics/entity/basic-accumulator/basic-accumulator.png",
        priority = "extra-high",
        width = 124,
        height = 103,
        shift = {0.7, -0.2}
      },
      charge_animation =
      {
        filename = "__base__/graphics/entity/basic-accumulator/basic-accumulator-charge-animation.png",
        frame_width = 138,
        frame_height = 135,
        line_length = 8,
        frame_count = 24,
        shift = {0.482, -0.638},
        animation_speed = 0.5
      },
      charge_cooldown = 30,
      charge_light = {intensity = 0.3, size = 7},
      discharge_animation =
      {
        filename = "__base__/graphics/entity/basic-accumulator/basic-accumulator-discharge-animation.png",
        frame_width = 147,
        frame_height = 128,
        line_length = 8,
        frame_count = 24,
        shift = {0.395, -0.525},
        animation_speed = 0.5
      },
      discharge_cooldown = 60,
      discharge_light = {intensity = 0.7, size = 7}
    }

Latest revision as of 14:32, 25 October 2024

The prototype docs have moved to a new website with an improved format. This documentation page can now be found here: https://lua-api.factorio.com/latest/prototypes/AccumulatorPrototype.html

This wiki page is no longer updated and will be removed at some point in the future, so please update your browser bookmarks or other links that sent you here. If you'd like to contribute to the new docs, you can leave your feedback on the forums.