Factorio Prototype DocsVersion 1.1.107

SpriteNWaySheet :: struct Example code

Inherits from SpriteParameters

Properties

frames optional :: uint32

Specifies how many of the directions of the SpriteNWay are filled up with this sheet.

Specifies how many of the directions of the SpriteNWay are filled up with this sheet.

hr_version optional :: SpriteNWaySheet

If this property exists and high resolution sprites are turned on, this is used to load the Sheet.

If this property exists and high resolution sprites are turned on, this is used to load the Sheet.

Inherited from SpriteParameters
filename :: FileName

The path to the sprite file to use.

The path to the sprite file to use.

priority optional :: SpritePriority
flags optional :: SpriteFlags
size optional :: SpriteSizeType or {SpriteSizeType, SpriteSizeType}

The width and height of the sprite. [...]

The width and height of the sprite. [...]

width optional :: SpriteSizeType

Mandatory if size is not defined. [...]

Mandatory if size is not defined. [...]

height optional :: SpriteSizeType

Mandatory if size is not defined. [...]

Mandatory if size is not defined. [...]

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.

position optional :: {SpriteSizeType, SpriteSizeType}

Loaded only when x and y are both 0. [...]

Loaded only when x and y are both 0. [...]

shift optional :: Vector

The shift in tiles. [...]

The shift in tiles. [...]

scale optional :: double

Values other than 1 specify the scale of the sprite on default zoom. [...]

Values other than 1 specify the scale of the sprite on default zoom. [...]

draw_as_shadow optional :: bool

Only one of draw_as_shadow, draw_as_glow and draw_as_light can be true. [...]

Only one of draw_as_shadow, draw_as_glow and draw_as_light can be true. [...]

draw_as_glow optional :: bool

Only one of draw_as_shadow, draw_as_glow and draw_as_light can be true. [...]

Only one of draw_as_shadow, draw_as_glow and draw_as_light can be true. [...]

draw_as_light optional :: bool

Only one of draw_as_shadow, draw_as_glow and draw_as_light can be true.

Only one of draw_as_shadow, draw_as_glow and draw_as_light can be true.

mipmap_count optional :: uint8

Only loaded if this is an icon, that is it has the flag "group=icon" or "group=gui".

Only loaded if this is an icon, that is it has the flag "group=icon" or "group=gui".

apply_runtime_tint optional :: bool
tint optional :: Color
blend_mode optional :: BlendMode
load_in_minimal_mode optional :: bool

Minimal mode is entered when mod loading fails. [...]

Minimal mode is entered when mod loading fails. [...]

premul_alpha optional :: bool

Whether alpha should be pre-multiplied.

Whether alpha should be pre-multiplied.

generate_sdf[overridden] optional :: bool

This property is only used by sprites used in UtilitySprites that have the "icon" flag set. [...]

This property is only used by sprites used in UtilitySprites that have the "icon" flag set. [...]

Properties

frames :: uint32 optional

Default: 4 if used in Sprite4Way, 8 if used in Sprite8Way

Specifies how many of the directions of the SpriteNWay are filled up with this sheet.

hr_version :: SpriteNWaySheet optional

If this property exists and high resolution sprites are turned on, this is used to load the Sheet.

Overridden Properties

generate_sdf :: bool optional

Default: false

Unused.

Example

sheet =
{
  filename = "__base__/graphics/entity/burner-inserter/burner-inserter-platform.png",
  priority = "extra-high",
  width = 46,
  height = 46,
  shift = {0.09375, 0},
  hr_version =
  {
    filename = "__base__/graphics/entity/burner-inserter/hr-burner-inserter-platform.png",
    priority = "extra-high",
    width = 105,
    height = 79,
    shift = util.by_pixel(1.5, 7.5-1),
    scale = 0.5
  }
}

Prototypes

Types