Prototype/Accumulator: Difference between revisions
Deadlock989 (talk | contribs) |
m (Protected "Prototype/Accumulator": Migrated prototype doc to separate website ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{Prototype parent|Prototype/ | '''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] | ||
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]. | |||
{{Prototype parent|Prototype/EntityWithOwner}} | |||
Entity with energy source with specialised animation for charging/decharging. | Entity with energy source with specialised animation for charging/decharging. | ||
Line 8: | Line 14: | ||
== Mandatory properties == | == Mandatory properties == | ||
This prototype inherits all the properties from [[Prototype/ | This prototype inherits all the properties from [[Prototype/EntityWithOwner]]. | ||
{{Prototype property|energy_source|[[Types/EnergySource|EnergySource]]}} | {{Prototype property|energy_source|[[Types/EnergySource|EnergySource]]}} |
Latest revision as of 09:27, 16 August 2023
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.
Prototype definitions » PrototypeBase » Prototype/Entity » Prototype/EntityWithHealth » Prototype/EntityWithOwner » Prototype/Accumulator
Entity with energy source with specialised animation for charging/decharging.
Usage in base
Mandatory properties
This prototype inherits all the properties from Prototype/EntityWithOwner.
energy_source
Type: EnergySource
The capacity of the energy source buffer specifies the capacity of the accumulator. Must be an electric energy source.
picture
Type: Sprite
charge_cooldown
Type: 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_cooldown
Type: uint16
How long (in ticks) the animation will last after discharge has been initialized.
Optional properties
charge_animation
Type: Animation
charge_light
Type: LightDefinition
Note that some kind of charge_animation must also be defined for the light to appear.
discharge_animation
Type: Animation
discharge_light
Type: LightDefinition
Note that some kind of discharge_animation must also be defined for the light to appear.
circuit_wire_connection_point
Type: WireConnectionPoint
Defines how wires visually connect to this accumulator.
circuit_wire_max_distance
Type: double
Default: 0
The maximum circuit wire distance for this entity.
draw_copper_wires
Type: bool
Default: true
draw_circuit_wires
Type: bool
Default: true
circuit_connector_sprites
Type: CircuitConnectorSprites
The pictures displayed for circuit connections to this accumulator.
default_output_signal
Type: SignalIDConnector
The name of the signal that is the default for when an accumulator is connected to the circuit network.
Example
{
type = "accumulator",
name = "accumulator",
icon = "__base__/graphics/icons/accumulator.png",
icon_size = 32,
flags = {"placeable-neutral", "player-creation"},
minable = {mining_time = 0.1, result = "accumulator"},
max_health = 150,
corpse = "accumulator-remnants",
collision_box = {{-0.9, -0.9}, {0.9, 0.9}},
selection_box = {{-1, -1}, {1, 1}},
drawing_box = {{-1, -1.5}, {1, 1}},
energy_source =
{
type = "electric",
buffer_capacity = "5MJ",
usage_priority = "tertiary",
input_flow_limit = "300kW",
output_flow_limit = "300kW"
},
picture = accumulator_picture(),
charge_animation = accumulator_charge(),
charge_cooldown = 30,
charge_light = {intensity = 0.3, size = 7, color = {r = 1.0, g = 1.0, b = 1.0}},
discharge_animation = accumulator_discharge(),
discharge_cooldown = 60,
discharge_light = {intensity = 0.7, size = 7, color = {r = 1.0, g = 1.0, b = 1.0}},
vehicle_impact_sound = { filename = "__base__/sound/car-metal-impact.ogg", volume = 0.65 },
working_sound =
{
sound =
{
filename = "__base__/sound/accumulator-working.ogg",
volume = 1
},
idle_sound =
{
filename = "__base__/sound/accumulator-idle.ogg",
volume = 0.4
},
max_sounds_per_type = 5
},
circuit_wire_connection_point = circuit_connector_definitions["accumulator"].points,
circuit_connector_sprites = circuit_connector_definitions["accumulator"].sprites,
circuit_wire_max_distance = default_circuit_wire_max_distance,
default_output_signal = {type = "virtual", name = "signal-A"}
}