Factorio.com|Forums|Wiki|Mod Portal|API Docs

# Factorio Prototype Docs Version 2.0.77

# Sprite4Way - Prototype Docs

## Sprite4Way :: struct or Sprite Example code

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

This struct is either loaded as `sheets` or `sheet` or a map of one sprite per direction. For per direction sprites, the sprites are loaded via `north`, `east`, `south` and `west`.

## Properties

- default
- sorted

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 if both `sheets` and `sheet` are not defined.
Only loaded 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. [...]

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. [...]
north optional | :: Sprite | Only loaded if both `sheets` and `sheet` are not defined.
Only loaded if both `sheets` and `sheet` are not defined.
sheet optional | :: SpriteNWaySheet | Only loaded if `sheets` is not defined.
Only loaded if `sheets` is not defined.
sheets optional | :: array[SpriteNWaySheet] |
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 if both `sheets` and `sheet` are not defined.

### east :: Sprite optional

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

Only loaded if `north` is defined.

### south :: Sprite optional

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

Only loaded if `north` is defined.

### west :: Sprite optional

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

Only loaded if `north` is defined.

## Example

    -- separate sprites per direction
    {
      north =
      {
        filename = "__base__/graphics/entity/assembling-machine-3/assembling-machine-3-pipe-N.png",
        priority = "extra-high",
        width = 71,
        height = 38,
        shift = util.by_pixel(2.25, 13.5),
        scale = 0.5
      },
      east =
      {
        filename = "__base__/graphics/entity/assembling-machine-3/assembling-machine-3-pipe-E.png",
        priority = "extra-high",
        width = 42,
        height = 76,
        shift = util.by_pixel(-24.5, 1),
        scale = 0.5
      },
      south =
      {
        filename = "__base__/graphics/entity/assembling-machine-3/assembling-machine-3-pipe-S.png",
        priority = "extra-high",
        width = 88,
        height = 61,
        shift = util.by_pixel(0, -31.25),
        scale = 0.5
      },
      west =
      {
        filename = "__base__/graphics/entity/assembling-machine-3/assembling-machine-3-pipe-W.png",
        priority = "extra-high",
        width = 39,
        height = 73,
        shift = util.by_pixel(25.75, 1.25),
        scale = 0.5
      }
    }

Type used in

- ArithmeticCombinatorPrototype::plus_symbol_sprites
- ArithmeticCombinatorPrototype::minus_symbol_sprites
- ArithmeticCombinatorPrototype::multiply_symbol_sprites
- ArithmeticCombinatorPrototype::divide_symbol_sprites
- ArithmeticCombinatorPrototype::modulo_symbol_sprites
- ArithmeticCombinatorPrototype::power_symbol_sprites
- ArithmeticCombinatorPrototype::left_shift_symbol_sprites
- ArithmeticCombinatorPrototype::right_shift_symbol_sprites
- ArithmeticCombinatorPrototype::and_symbol_sprites
- ArithmeticCombinatorPrototype::or_symbol_sprites
- ArithmeticCombinatorPrototype::xor_symbol_sprites
- CombinatorPrototype::sprites
- CombinatorPrototype::frozen_patch
- CombinatorPrototype::activity_led_sprites
- ConstantCombinatorPrototype::sprites
- ConstantCombinatorPrototype::activity_led_sprites
- CraftingMachineGraphicsSet::frozen_patch
- DeciderCombinatorPrototype::equal_symbol_sprites
- DeciderCombinatorPrototype::greater_symbol_sprites
- DeciderCombinatorPrototype::less_symbol_sprites
- DeciderCombinatorPrototype::not_equal_symbol_sprites
- DeciderCombinatorPrototype::greater_or_equal_symbol_sprites
- DeciderCombinatorPrototype::less_or_equal_symbol_sprites
- DisplayPanelPrototype::sprites
- ElectricEnergyInterfacePrototype::pictures
- EntityWithHealthPrototype::integration_patch
- FluidBox::pipe_covers
- FluidBox::pipe_covers_frozen
- FluidBox::pipe_picture
- FluidBox::pipe_picture_frozen
- FluidBox::mirrored_pipe_picture
- FluidBox::mirrored_pipe_picture_frozen
- FluidTurretPrototype::enough_fuel_indicator_picture
- FluidTurretPrototype::not_enough_fuel_indicator_picture
- FusionReactorGraphicsSet::structure
- FusionReactorGraphicsSet::working_light_pictures
- HeatBuffer::pipe_covers
- HeatBuffer::heat_pipe_covers
- HeatBuffer::heat_picture
- HeatBuffer::heat_glow
- HeatEnergySource::pipe_covers
- HeatEnergySource::heat_pipe_covers
- HeatEnergySource::heat_picture
- HeatEnergySource::heat_glow
- InserterPrototype::platform_picture
- InserterPrototype::platform_frozen
- LinkedBeltStructure::direction_in
- LinkedBeltStructure::direction_out
- LinkedBeltStructure::back_patch
- LinkedBeltStructure::front_patch
- LinkedBeltStructure::direction_in_side_loading
- LinkedBeltStructure::direction_out_side_loading
- LoaderStructure::direction_in
- LoaderStructure::direction_out
- LoaderStructure::back_patch
- LoaderStructure::front_patch
- LoaderStructure::frozen_patch_in
- LoaderStructure::frozen_patch_out
- MiningDrillGraphicsSet::frozen_patch
- MiningDrillPrototype::base_picture
- OffshorePumpGraphicsSet::glass_pictures
- OffshorePumpGraphicsSet::base_pictures
- OffshorePumpGraphicsSet::underwater_pictures
- PipeToGroundPrototype::pictures
- PipeToGroundPrototype::frozen_patch
- PipeToGroundPrototype::visualization
- PipeToGroundPrototype::disabled_visualization
- PumpPrototype::glass_pictures
- PumpPrototype::frozen_patch
- SelectorCombinatorPrototype::max_symbol_sprites
- SelectorCombinatorPrototype::min_symbol_sprites
- SelectorCombinatorPrototype::count_symbol_sprites
- SelectorCombinatorPrototype::random_symbol_sprites
- SelectorCombinatorPrototype::stack_size_sprites
- SelectorCombinatorPrototype::rocket_capacity_sprites
- SelectorCombinatorPrototype::quality_symbol_sprites
- SimpleEntityPrototype::picture
- SimpleEntityWithOwnerPrototype::picture
- SplitterPrototype::frozen_patch
- StorageTankPictures::picture
- StorageTankPictures::frozen_patch
- TrainStopLight::picture
- TrainStopLight::red_picture
- UndergroundBeltStructure::direction_in
- UndergroundBeltStructure::direction_out
- UndergroundBeltStructure::back_patch
- UndergroundBeltStructure::front_patch
- UndergroundBeltStructure::direction_in_side_loading
- UndergroundBeltStructure::direction_out_side_loading
- UndergroundBeltStructure::frozen_patch_in
- UndergroundBeltStructure::frozen_patch_out
- ValvePrototype::frozen_patch
- WallPictures::water_connection_patch
- WallPictures::gate_connection_patch
- WallPrototype::wall_diode_green
- WallPrototype::wall_diode_red