Prototype/RailSignalBase: Difference between revisions
(Added prototype type to page) |
(Updated styling of prototype doc migration note) |
||
(8 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
= | <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/RailSignalBasePrototype.html https://lua-api.factorio.com/latest/prototypes/RailSignalBasePrototype.html] | ||
This | |||
</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> | |||
{{Prototype parent|Prototype/EntityWithOwner}} | |||
The abstract base entity for both rail signals. | |||
{{Prototype TOC|''abstract''}} | |||
== Extensions == | == Extensions == | ||
Line 9: | Line 15: | ||
== Mandatory properties == | == Mandatory properties == | ||
This prototype inherits all the properties from [[Prototype/ | This prototype inherits all the properties from [[Prototype/EntityWithOwner]]. | ||
{{Prototype property|animation|[[Types/RotatedAnimation|RotatedAnimation]]}} | |||
== Optional properties == | == Optional properties == | ||
=== | {{Prototype property|rail_piece|[[Types/Animation|Animation]]|optional=true}} | ||
{{Prototype property|green_light|[[Types/LightDefinition|LightDefinition]]|optional=true}} | |||
{{Prototype property|orange_light|[[Types/LightDefinition|LightDefinition]]|optional=true}} | |||
{{Prototype property|red_light|[[Types/LightDefinition|LightDefinition]]|optional=true}} | |||
{{Prototype property|default_red_output_signal|[[Types/SignalIDConnector|SignalIDConnector]]|optional=true}} | |||
{{Prototype property|default_orange_output_signal|[[Types/SignalIDConnector|SignalIDConnector]]|optional=true}} | |||
{{Prototype property|default_green_output_signal|[[Types/SignalIDConnector|SignalIDConnector]]|optional=true}} | |||
{{Prototype property|circuit_wire_max_distance|[[Types/double|double]]|0|optional=true}} | |||
The maximum circuit wire distance for this entity. | |||
{{Prototype property|draw_copper_wires|[[Types/bool|bool]]|true|optional=true}} | |||
{{Prototype property|draw_circuit_wires|[[Types/bool|bool]]|true|optional=true}} | |||
{{Prototype property|circuit_wire_connection_points|[[Types/table|table]] of [[Types/WireConnectionPoint|WireConnectionPoint]]|optional=true}} | |||
Mandatory if circuit_wire_max_distance > 0. | |||
{{Prototype property|circuit_connector_sprites|[[Types/table|table]] of [[Types/CircuitConnectorSprites|CircuitConnectorSprites]]|optional=true}} | |||
Mandatory if circuit_wire_max_distance > 0. | |||
== Mandatory values == | |||
The [[Prototype/Entity#collision_box|collision_box]] of rail signals is hardcoded to {{-0.2, -0.2}, {0.2, 0.2}}. | |||
Rail signals have additional requirements for the properties inherited from [[Prototype/Entity]]: | |||
* The [[Types/EntityPrototypeFlags#.22placeable-off-grid.22|"placeable-off-grid"]] flag will be ignored. | |||
* Rail signals must collide with each other, can be achieved by having the [[Types/CollisionMask#Layers|"rail-layer"]] collision mask layer on all rail signals. |
Latest revision as of 10:43, 21 September 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/RailSignalBasePrototype.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/RailSignalBase
The abstract base entity for both rail signals.
Extensions
- Prototype/RailChainSignal rail-chain-signal
- Prototype/RailSignal rail-signal
Mandatory properties
This prototype inherits all the properties from Prototype/EntityWithOwner.
animation
Type: RotatedAnimation
Optional properties
rail_piece
Type: Animation
green_light
Type: LightDefinition
orange_light
Type: LightDefinition
red_light
Type: LightDefinition
default_red_output_signal
Type: SignalIDConnector
default_orange_output_signal
Type: SignalIDConnector
default_green_output_signal
Type: SignalIDConnector
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_wire_connection_points
Type: table of WireConnectionPoint
Mandatory if circuit_wire_max_distance > 0.
circuit_connector_sprites
Type: table of CircuitConnectorSprites
Mandatory if circuit_wire_max_distance > 0.
Mandatory values
The collision_box of rail signals is hardcoded to {{-0.2, -0.2}, {0.2, 0.2}}.
Rail signals have additional requirements for the properties inherited from Prototype/Entity:
- The "placeable-off-grid" flag will be ignored.
- Rail signals must collide with each other, can be achieved by having the "rail-layer" collision mask layer on all rail signals.