Prototype/RailRemnants: Difference between revisions
(Created page with "== Basics == Extends Prototype/Corpse. == Mandatory properties == This prototype inherits all the properties from Prototype/Corpse. === bending_type === '''Type''':...") |
(Updated styling of prototype doc migration note) |
||
(7 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/RailRemnantsPrototype.html https://lua-api.factorio.com/latest/prototypes/RailRemnantsPrototype.html] | ||
</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/Corpse}} | |||
Used for rail corpses. | |||
{{Prototype TOC|rail-remnants}} | |||
== Mandatory properties == | == Mandatory properties == | ||
This prototype inherits all the properties from [[Prototype/Corpse]]. | This prototype inherits all the properties from [[Prototype/Corpse]]. | ||
{{Prototype property|bending_type|[[Types/string|string]]}} | |||
Either "straight" or "turn". | |||
{{Prototype property|pictures|[[Types/table|table]]}} | |||
Table with the following mandatory members: | |||
* straight_rail_horizontal - [[Types/RailPieceLayers|RailPieceLayers]] | |||
* straight_rail_vertical - [[Types/RailPieceLayers|RailPieceLayers]] | |||
* straight_rail_diagonal_left_top - [[Types/RailPieceLayers|RailPieceLayers]] | |||
* straight_rail_diagonal_right_top - [[Types/RailPieceLayers|RailPieceLayers]] | |||
* straight_rail_diagonal_right_bottom - [[Types/RailPieceLayers|RailPieceLayers]] | |||
* straight_rail_diagonal_left_bottom - [[Types/RailPieceLayers|RailPieceLayers]] | |||
* curved_rail_vertical_left_top - [[Types/RailPieceLayers|RailPieceLayers]] | |||
* curved_rail_vertical_right_top - [[Types/RailPieceLayers|RailPieceLayers]] | |||
* curved_rail_vertical_right_bottom - [[Types/RailPieceLayers|RailPieceLayers]] | |||
* curved_rail_vertical_left_bottom - [[Types/RailPieceLayers|RailPieceLayers]] | |||
* curved_rail_horizontal_left_top - [[Types/RailPieceLayers|RailPieceLayers]] | |||
* curved_rail_horizontal_right_top - [[Types/RailPieceLayers|RailPieceLayers]] | |||
* curved_rail_horizontal_right_bottom - [[Types/RailPieceLayers|RailPieceLayers]] | |||
* curved_rail_horizontal_left_bottom - [[Types/RailPieceLayers|RailPieceLayers]] | |||
* rail_endings - [[Types/Sprite8Way|Sprite8Way]] | |||
== Mandatory values == | |||
All rail remnant [[Prototype/Entity#collision_box|collision_box]]es are hardcoded and cannot be modified. The hardcoded values are: | |||
=== | * straight_rail_primary_bounding_box = {-0.7, -0.99, 0.7, 0.99} | ||
* diagonal_straight_rail_primary_bounding_box = {-0.65, -0.7, 0.65, 0.7} | |||
* curved_rail_primary_bounding_box = {-0.75, -0.55, 0.75, 1.6} | |||
* secondary_bounding_box = {-0.68, -2.7, 0.68, 2.7} | |||
Furthermore, the [[Prototype/Entity#selection_box|selection_box]]es are automatically calculated from the bounding boxes, so effectively also hardcoded. | |||
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/RailRemnantsPrototype.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/Corpse » Prototype/RailRemnants
Used for rail corpses.
Mandatory properties
This prototype inherits all the properties from Prototype/Corpse.
bending_type
Type: string
Either "straight" or "turn".
pictures
Type: table
Table with the following mandatory members:
- straight_rail_horizontal - RailPieceLayers
- straight_rail_vertical - RailPieceLayers
- straight_rail_diagonal_left_top - RailPieceLayers
- straight_rail_diagonal_right_top - RailPieceLayers
- straight_rail_diagonal_right_bottom - RailPieceLayers
- straight_rail_diagonal_left_bottom - RailPieceLayers
- curved_rail_vertical_left_top - RailPieceLayers
- curved_rail_vertical_right_top - RailPieceLayers
- curved_rail_vertical_right_bottom - RailPieceLayers
- curved_rail_vertical_left_bottom - RailPieceLayers
- curved_rail_horizontal_left_top - RailPieceLayers
- curved_rail_horizontal_right_top - RailPieceLayers
- curved_rail_horizontal_right_bottom - RailPieceLayers
- curved_rail_horizontal_left_bottom - RailPieceLayers
- rail_endings - Sprite8Way
Mandatory values
All rail remnant collision_boxes are hardcoded and cannot be modified. The hardcoded values are:
- straight_rail_primary_bounding_box = {-0.7, -0.99, 0.7, 0.99}
- diagonal_straight_rail_primary_bounding_box = {-0.65, -0.7, 0.65, 0.7}
- curved_rail_primary_bounding_box = {-0.75, -0.55, 0.75, 1.6}
- secondary_bounding_box = {-0.68, -2.7, 0.68, 2.7}
Furthermore, the selection_boxes are automatically calculated from the bounding boxes, so effectively also hardcoded.