Prototype/RailRemnants: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
(Set prototype parent)
(mandatory values (collision boxes))
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{Prototype parent|Prototype/Corpse}}
{{Prototype parent|Prototype/Corpse}}
Used for rail corpses.


== Basics ==
{{Prototype TOC|rail-remnants}}
Prototype type: '''rail-remnants'''
 
Extends [[Prototype/Corpse]].


== Mandatory properties ==
== Mandatory properties ==
This prototype inherits all the properties from [[Prototype/Corpse]].
This prototype inherits all the properties from [[Prototype/Corpse]].


=== bending_type ===
{{Prototype property|bending_type|[[Types/string|string]]}}
'''Type''': [[Types/string]]
Either "straight" or "turn".
 
{{Prototype property|pictures|[[Types/table|table]]}}
Table with the following mandatory members:


Either "straight" or "turn".
* 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]]


=== pictures ===
== Mandatory values ==
'''Type''': [[Types/table]]
All rail remnant [[Prototype/Entity#collision_box|collision_box]]es are hardcoded and cannot be modified. The hardcoded values are:


Table with the following mandatory members:
* 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}


* straight_rail_horizontal - [[Types/RailPieceLayers]]
Furthermore, the [[Prototype/Entity#selection_box|selection_box]]es are automatically calculated from the bounding boxes, so effectively also hardcoded.
* straight_rail_vertical - [[Types/RailPieceLayers]]
* straight_rail_diagonal_left_top - [[Types/RailPieceLayers]]
* straight_rail_diagonal_right_top - [[Types/RailPieceLayers]]
* straight_rail_diagonal_right_bottom - [[Types/RailPieceLayers]]
* straight_rail_diagonal_left_bottom - [[Types/RailPieceLayers]]
* curved_rail_vertical_left_top - [[Types/RailPieceLayers]]
* curved_rail_vertical_right_top - [[Types/RailPieceLayers]]
* curved_rail_vertical_right_bottom - [[Types/RailPieceLayers]]
* curved_rail_vertical_left_bottom - [[Types/RailPieceLayers]]
* curved_rail_horizontal_left_top - [[Types/RailPieceLayers]]
* curved_rail_horizontal_right_top - [[Types/RailPieceLayers]]
* curved_rail_horizontal_right_bottom - [[Types/RailPieceLayers]]
* curved_rail_horizontal_left_bottom - [[Types/RailPieceLayers]]
* rail_endings - [[Types/Sprite8Way]]

Latest revision as of 15:23, 23 October 2020

Prototype definitions » PrototypeBase » Prototype/Entity » Prototype/Corpse » Prototype/RailRemnants


Used for rail corpses.


Prototype/RailRemnants — rail-remnants
bending_type::string
pictures::table
Inherited from Prototype/Corpse
animation::RotatedAnimationVariations (optional)
animation_overlay::RotatedAnimationVariations (optional)
animation_overlay_final_render_layer::RenderLayer (optional)
animation_overlay_render_layer::RenderLayer (optional)
animation_render_layer::RenderLayer (optional)
direction_shuffle::table of tables of uint16 (optional)
dying_speed::float (optional)
final_render_layer::RenderLayer (optional)
ground_patch::AnimationVariations (optional)
ground_patch_fade_in_delay::float (optional)
ground_patch_fade_in_speed::float (optional)
ground_patch_fade_out_duration::float (optional)
ground_patch_fade_out_start::float (optional)
ground_patch_higher::AnimationVariations (optional)
ground_patch_render_layer::RenderLayer (optional)
remove_on_entity_placement::bool (optional)
remove_on_tile_placement::bool (optional)
shuffle_directions_at_frame::uint8 (optional)
splash::AnimationVariations (optional)
splash_render_layer::RenderLayer (optional)
splash_speed::float (optional)
time_before_removed::int32 (optional)
time_before_shading_off::int32 (optional)
use_tile_color_for_ground_patch_tint::bool (optional)
Inherited from Prototype/Entity
icons, icon, icon_size (IconSpecification)::IconSpecification
additional_pastable_entities::table of string (optional)
alert_icon_scale::float (optional)
alert_icon_shift::vector (optional)
allow_copy_paste::bool (optional)
autoplace::AutoplaceSpecification (optional)
build_base_evolution_requirement::double (optional)
build_grid_size::uint8 (optional)
build_sound::Sound (optional)
close_sound::Sound (optional)
collision_box::BoundingBox (optional)
collision_mask::CollisionMask (optional)
created_effect::Trigger (optional)
created_smoke::CreateTrivialSmokeEffectItem (optional)
drawing_box::BoundingBox (optional)
emissions_per_second::double (optional)
enemy_map_color::Color (optional)
fast_replaceable_group::string (optional)
flags::EntityPrototypeFlags (optional)
friendly_map_color::Color (optional)
hit_visualization_box::BoundingBox (optional)
map_color::Color (optional)
map_generator_bounding_box::BoundingBox (optional)
minable::MinableProperties (optional)
mined_sound::Sound (optional)
mining_sound::Sound (optional)
next_upgrade::string (optional)
open_sound::Sound (optional)
placeable_by::ItemToPlace or table of ItemToPlace (optional)
protected_from_tile_building::bool (optional)
radius_visualisation_specification::RadiusVisualisationSpecification (optional)
remains_when_mined::string or table of string (optional)
remove_decoratives::string (optional)
rotated_sound::Sound (optional)
selectable_in_game::bool (optional)
selection_box::BoundingBox (optional)
selection_priority::uint8 (optional)
shooting_cursor_size::double (optional)
sticker_box::BoundingBox (optional)
subgroup::string (optional)
tile_height::uint32 (optional)
tile_width::uint32 (optional)
trigger_target_mask::TriggerTargetMask (optional)
vehicle_impact_sound::Sound (optional)
water_reflection::WaterReflectionDefinition (optional)
working_sound::WorkingSound (optional)
Inherited from PrototypeBase
name::string
type::string
localised_description::LocalisedString (optional)
localised_name::LocalisedString (optional)
order::Order (optional)

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:

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.