pub struct Sprite {Show 18 fields
pub name: &'static str,
pub allow_forced_downscale: Option<bool>,
pub apply_runtime_tint: Option<bool>,
pub apply_special_effect: Option<bool>,
pub blend_mode: Option<&'static str>,
pub draw_as_glow: Option<bool>,
pub draw_as_light: Option<bool>,
pub draw_as_shadow: Option<bool>,
pub filename: Option<&'static str>,
pub generate_sdf: Option<bool>,
pub invert_colors: Option<bool>,
pub load_in_minimal_mode: Option<bool>,
pub mipmap_count: Option<i64>,
pub premul_alpha: Option<bool>,
pub rotate_shift: Option<bool>,
pub scale: Option<f64>,
pub tint: Option<Color>,
pub tint_as_overlay: Option<bool>,
}Expand description
Minimal SpritePrototype for data.extend.
Specifies an image that can be used with SpritePath at runtime.
type = "sprite" is injected by the Lua generator.
Fields§
§name: &'static strName of the sprite. Can be used as a SpritePath at runtime.
allow_forced_downscale: Option<bool>Only loaded if layers is not defined.
If true, the sprite may be downsampled to half its size on load even when ‘Sprite quality’ graphics setting is set to ‘High’. Whether downsampling happens depends on detected hardware and other graphics settings.
apply_runtime_tint: Option<bool>Only loaded if layers is not defined.
apply_special_effect: Option<bool>Only loaded if layers is not defined.
blend_mode: Option<&'static str>Only loaded if layers is not defined.
draw_as_glow: Option<bool>Only loaded if layers is not defined.
Only one of draw_as_shadow, draw_as_glow and draw_as_light can be true. This takes precedence over draw_as_light.
Draws first as a normal sprite, then again as a light layer. See https://forums.factorio.com/91682.
draw_as_light: Option<bool>Only loaded if layers is not defined.
Only one of draw_as_shadow, draw_as_glow and draw_as_light can be true.
draw_as_shadow: Option<bool>Only loaded if layers is not defined.
Only one of draw_as_shadow, draw_as_glow and draw_as_light can be true. This takes precedence over draw_as_glow and draw_as_light.
filename: Option<&'static str>Only loaded, and mandatory if layers is not defined.
The path to the sprite file to use.
generate_sdf: Option<bool>Only loaded if layers is not defined.
Unused.
invert_colors: Option<bool>Only loaded if layers is not defined.
load_in_minimal_mode: Option<bool>Only loaded if layers is not defined.
Minimal mode is entered when mod loading fails. You are in it when you see the gray box after (part of) the loading screen that tells you a mod error. Modders can ignore this property.
mipmap_count: Option<i64>Only loaded if layers is not defined.
Only loaded if this is an icon, that is it has the flag "group=icon" or "group=gui".
premul_alpha: Option<bool>Only loaded if layers is not defined.
Whether alpha should be pre-multiplied.
rotate_shift: Option<bool>Only loaded if layers is not defined.
scale: Option<f64>Only loaded if layers is not defined.
Values other than 1 specify the scale of the sprite on default zoom. A scale of 2 means that the picture will be two times bigger on screen (and thus more pixelated).
tint: Option<Color>Only loaded if layers is not defined.
tint_as_overlay: Option<bool>Only loaded if layers is not defined.