Factorio Prototype DocsVersion 1.1.107

Sprite4Way :: struct or SpriteExample code

A map of sprites for all 4 directions of the entity. If this is loaded as a single Sprite, it applies to all directions.

Properties

sheets optional :: array[SpriteNWaySheet]
sheet optional :: SpriteNWaySheet

Only loaded if sheets is not defined.

Only loaded if sheets is not defined.

north optional :: Sprite

Only loaded, and mandatory if both sheets and sheet are not defined.

Only loaded, and mandatory if both sheets and sheet are not defined.

east optional :: Sprite

Only loaded, and mandatory if both sheets and sheet are not defined.

Only loaded, and mandatory if both sheets and sheet are not defined.

south optional :: Sprite

Only loaded, and mandatory if both sheets and sheet are not defined.

Only loaded, and mandatory if both sheets and sheet are not defined.

west optional :: Sprite

Only loaded, and mandatory if both sheets and sheet are not defined.

Only loaded, and mandatory if both sheets and sheet are not defined.

Properties

sheets :: array[SpriteNWaySheet] optional

sheet :: SpriteNWaySheet optional

Only loaded if sheets is not defined.

north :: Sprite optional

Only loaded, and mandatory if both sheets and sheet are not defined.

east :: Sprite optional

Only loaded, and mandatory if both sheets and sheet are not defined.

south :: Sprite optional

Only loaded, and mandatory if both sheets and sheet are not defined.

west :: Sprite optional

Only loaded, and mandatory if both sheets and sheet are not defined.

Example

-- separate sprites per direction
{
  north =
  {
    filename = "__base__/graphics/entity/assembling-machine-3/assembling-machine-3-pipe-N.png",
    priority = "extra-high",
    width = 35,
    height = 18,
    shift = util.by_pixel(2.5, 14)
  },
  east =
  {
    filename = "__base__/graphics/entity/assembling-machine-3/assembling-machine-3-pipe-E.png",
    priority = "extra-high",
    width = 20,
    height = 38,
    shift = util.by_pixel(-25, 1)
  },
  south =
  {
    filename = "__base__/graphics/entity/assembling-machine-3/assembling-machine-3-pipe-S.png",
    priority = "extra-high",
    width = 44,
    height = 31,
    shift = util.by_pixel(0, -31.5)
  },
  west =
  {
    filename = "__base__/graphics/entity/assembling-machine-3/assembling-machine-3-pipe-W.png",
    priority = "extra-high",
    width = 19,
    height = 37,
    shift = util.by_pixel(25.5, 1.5)
  }
}

Type used in

Prototypes

Types