Factorio Prototype DocsVersion 2.0.20

TileTransitionVariantLayout :: struct Example code

The properties from the parent TileSpriteLayoutVariant provide defaults for the properties defined here.

The {inner_corner | outer_corner | side | double_side | u_transition | o_transition}_* properties provide defaults for the properties inside the specific variant. They are used to specify select values for the variant without creating the table for the variant.

These various ways to define the variants are also shown in the examples below.

Inherits from TileSpriteLayoutVariant

Properties

x_offset optional :: SpriteSizeType
y_offset optional :: SpriteSizeType
inner_corner optional :: TileSpriteLayoutVariant

Defaults to the values set in the inner_corner_* properties.

Defaults to the values set in the inner_corner_* properties.

outer_corner optional :: TileSpriteLayoutVariant

Defaults to the values set in the outer_corner_* properties.

Defaults to the values set in the outer_corner_* properties.

side optional :: TileSpriteLayoutVariant

Defaults to the values set in the side_* properties.

Defaults to the values set in the side_* properties.

double_side optional :: TileSpriteLayoutVariant

Defaults to the values set in the double_side_* properties.

Defaults to the values set in the double_side_* properties.

u_transition optional :: TileSpriteLayoutVariant

Defaults to the values set in the u_transition_* properties.

Defaults to the values set in the u_transition_* properties.

o_transition optional :: TileSpriteLayoutVariant

Defaults to the values set in the o_transition_* properties.

Defaults to the values set in the o_transition_* properties.

inner_corner_scale optional :: float
inner_corner_x optional :: SpriteSizeType

Horizontal position of the sprite in the source file in pixels.

Horizontal position of the sprite in the source file in pixels.

inner_corner_y optional :: SpriteSizeType

Vertical position of the sprite in the source file in pixels.

Vertical position of the sprite in the source file in pixels.

inner_corner_tile_height optional :: uint8
inner_corner_line_length optional :: uint8
inner_corner_count optional :: uint8
outer_corner_scale optional :: float
outer_corner_x optional :: SpriteSizeType

Horizontal position of the sprite in the source file in pixels.

Horizontal position of the sprite in the source file in pixels.

outer_corner_y optional :: SpriteSizeType

Vertical position of the sprite in the source file in pixels.

Vertical position of the sprite in the source file in pixels.

outer_corner_tile_height optional :: uint8
outer_corner_line_length optional :: uint8
outer_corner_count optional :: uint8
side_scale optional :: float
side_x optional :: SpriteSizeType

Horizontal position of the sprite in the source file in pixels.

Horizontal position of the sprite in the source file in pixels.

side_y optional :: SpriteSizeType

Vertical position of the sprite in the source file in pixels.

Vertical position of the sprite in the source file in pixels.

side_tile_height optional :: uint8
side_line_length optional :: uint8
side_count optional :: uint8
double_side_scale optional :: float
double_side_x optional :: SpriteSizeType

Horizontal position of the sprite in the source file in pixels.

Horizontal position of the sprite in the source file in pixels.

double_side_y optional :: SpriteSizeType

Vertical position of the sprite in the source file in pixels.

Vertical position of the sprite in the source file in pixels.

double_side_tile_height optional :: uint8
double_side_line_length optional :: uint8
double_side_count optional :: uint8
u_transition_scale optional :: float
u_transition_x optional :: SpriteSizeType

Horizontal position of the sprite in the source file in pixels.

Horizontal position of the sprite in the source file in pixels.

u_transition_y optional :: SpriteSizeType

Vertical position of the sprite in the source file in pixels.

Vertical position of the sprite in the source file in pixels.

u_transition_tile_height optional :: uint8
u_transition_line_length optional :: uint8
u_transition_count optional :: uint8
o_transition_scale optional :: float
o_transition_x optional :: SpriteSizeType

Horizontal position of the sprite in the source file in pixels.

Horizontal position of the sprite in the source file in pixels.

o_transition_y optional :: SpriteSizeType

Vertical position of the sprite in the source file in pixels.

Vertical position of the sprite in the source file in pixels.

o_transition_tile_height optional :: uint8
o_transition_line_length optional :: uint8
o_transition_count optional :: uint8

Inherited from TileSpriteLayoutVariant
spritesheet optional :: FileName
scale optional :: float
x optional :: SpriteSizeType

Horizontal position of the sprite in the source file in pixels.

Horizontal position of the sprite in the source file in pixels.

y optional :: SpriteSizeType

Vertical position of the sprite in the source file in pixels.

Vertical position of the sprite in the source file in pixels.

tile_height optional :: uint8

Height of the transition sprite in tiles. [...]

Height of the transition sprite in tiles. [...]

line_length optional :: uint8

Once the specified number of pictures is loaded, other pictures are loaded on other line. [...]

Once the specified number of pictures is loaded, other pictures are loaded on other line. [...]

count optional :: uint8

Frame count.

Frame count.

Properties

x_offset :: SpriteSizeType optional

Default: 0

y_offset :: SpriteSizeType optional

Default: 0

inner_corner :: TileSpriteLayoutVariant optional

Defaults to the values set in the inner_corner_* properties.

outer_corner :: TileSpriteLayoutVariant optional

Defaults to the values set in the outer_corner_* properties.

side :: TileSpriteLayoutVariant optional

Defaults to the values set in the side_* properties.

double_side :: TileSpriteLayoutVariant optional

Defaults to the values set in the double_side_* properties.

u_transition :: TileSpriteLayoutVariant optional

Defaults to the values set in the u_transition_* properties.

o_transition :: TileSpriteLayoutVariant optional

Defaults to the values set in the o_transition_* properties.

inner_corner_scale :: float optional

inner_corner_x :: SpriteSizeType optional

Horizontal position of the sprite in the source file in pixels.

inner_corner_y :: SpriteSizeType optional

Vertical position of the sprite in the source file in pixels.

inner_corner_tile_height :: uint8 optional

inner_corner_line_length :: uint8 optional

inner_corner_count :: uint8 optional

outer_corner_scale :: float optional

outer_corner_x :: SpriteSizeType optional

Horizontal position of the sprite in the source file in pixels.

outer_corner_y :: SpriteSizeType optional

Vertical position of the sprite in the source file in pixels.

outer_corner_tile_height :: uint8 optional

outer_corner_line_length :: uint8 optional

outer_corner_count :: uint8 optional

side_scale :: float optional

side_x :: SpriteSizeType optional

Horizontal position of the sprite in the source file in pixels.

side_y :: SpriteSizeType optional

Vertical position of the sprite in the source file in pixels.

side_tile_height :: uint8 optional

side_line_length :: uint8 optional

side_count :: uint8 optional

double_side_scale :: float optional

double_side_x :: SpriteSizeType optional

Horizontal position of the sprite in the source file in pixels.

double_side_y :: SpriteSizeType optional

Vertical position of the sprite in the source file in pixels.

double_side_tile_height :: uint8 optional

double_side_line_length :: uint8 optional

double_side_count :: uint8 optional

u_transition_scale :: float optional

u_transition_x :: SpriteSizeType optional

Horizontal position of the sprite in the source file in pixels.

u_transition_y :: SpriteSizeType optional

Vertical position of the sprite in the source file in pixels.

u_transition_tile_height :: uint8 optional

u_transition_line_length :: uint8 optional

u_transition_count :: uint8 optional

o_transition_scale :: float optional

o_transition_x :: SpriteSizeType optional

Horizontal position of the sprite in the source file in pixels.

o_transition_y :: SpriteSizeType optional

Vertical position of the sprite in the source file in pixels.

o_transition_tile_height :: uint8 optional

o_transition_line_length :: uint8 optional

o_transition_count :: uint8 optional

Examples

-- longest version, using TileSpriteLayoutVariant tables for each variant
{
  inner_corner =
  {
    scale = 0.5,
    count = 8,
  },
  outer_corner =
  {
    scale = 0.5,
    count = 8,
    x = 576
  },
  u_transition  =
  {
    scale = 0.5,
    count = 1,
    x = 1728
  },
  [...]
}
-- The above version is quite verbose, scale is duplicated in each variant layout.
-- So it is possible to define default value of each property of TileSpriteLayoutVariant directly in TileTransitionVariantLayout:
{
  scale = 0.5,
  inner_corner =
  {
    count = 8,
  },
  outer_corner =
  {
    count = 8,
    x = 576
  },
  u_transition  =
  {
    count = 1,
    x = 1728
  },
  [...]
}
-- The above version is creating a table to just specify inner_corner has 8 count. It can be shorter by using variant prefix properties:
{
  scale = 0.5,
  inner_corner_count = 8,
  outer_corner_count = 8,
  u_transition_count = 1,
  outer_corner_x = 576,
  u_transition_x = 1728,
  [...]
}

Prototypes

Types

Defines