pub struct LuaRenderObject;Expand description
Reference to a single LuaRendering object.
Implementations§
Source§impl LuaRenderObject
impl LuaRenderObject
Sourcepub fn animation_offset(&self) -> f64
pub fn animation_offset(&self) -> f64
Animation offset of this animation. Animation offset in frames.
Sourcepub fn animation_speed(&self) -> f64
pub fn animation_speed(&self) -> f64
Animation speed of this animation. Animation speed in frames per tick.
Sourcepub fn blink_interval(&self) -> u16
pub fn blink_interval(&self) -> u16
Blink interval of this object based on the internal “update tick”. When zero, blinking is disabled. For other values, the object will be visible the given number of ticks and then invisible for the same duration. Objects with the same blink interval will blink synchronously. Blink interval of game alerts is 30.
For example, when the interval is 60, the object is visible for 60 ticks and hidden for the next 60.
Sourcepub fn dash_length(&self) -> f64
pub fn dash_length(&self) -> f64
Dash length of this line.
Sourcepub fn dash_offset(&self) -> f64
pub fn dash_offset(&self) -> f64
Starting offset to apply to dashes of this line. Cannot be greater than dash_length + gap_length.
Sourcepub fn draw_on_ground(&self) -> bool
pub fn draw_on_ground(&self) -> bool
If this object is being drawn on the ground, under most entities and sprites.
In render_mode == “chart”, this value is unused.
Sourcepub fn forces(&self) -> Vec<LuaForce>
pub fn forces(&self) -> Vec<LuaForce>
Forces for which this object is rendered or nil if visible to all forces. Writing nil or empty array will make this object visible to all forces.
Sourcepub fn gap_length(&self) -> f64
pub fn gap_length(&self) -> f64
Length of the gaps in this line.
Sourcepub fn light_mode(&self) -> ScriptSpriteLightMode
pub fn light_mode(&self) -> ScriptSpriteLightMode
Whether this sprite or animation should be rendered as a sprite, light or both at once.
Sourcepub fn max_radius(&self) -> f64
pub fn max_radius(&self) -> f64
Radius of the outer edge of this arc.
Sourcepub fn min_radius(&self) -> f64
pub fn min_radius(&self) -> f64
Radius of the inner edge of this arc.
Sourcepub fn minimum_darkness(&self) -> f32
pub fn minimum_darkness(&self) -> f32
Minimum darkness at which this light is rendered.
Sourcepub fn object_name(&self) -> &str
pub fn object_name(&self) -> &str
The class name of this object. Available even when valid is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
Sourcepub fn only_in_alt_mode(&self) -> bool
pub fn only_in_alt_mode(&self) -> bool
If this object is only rendered in alt-mode.
Sourcepub fn orientation(&self) -> LuaAny
pub fn orientation(&self) -> LuaAny
Orientation of this object.
Polygon vertices that are set to an entity will ignore this.
Sourcepub fn orientation_target(&self) -> LuaAny
pub fn orientation_target(&self) -> LuaAny
Target to which this object rotates so that it faces the target. Note that orientation is still applied to the object. Writing nil will clear the orientation_target. nil if no target.
Polygon vertices that are set to an entity will ignore this.
Sourcepub fn oriented(&self) -> bool
pub fn oriented(&self) -> bool
If this light is rendered with the same orientation as the target entity. Note that orientation is still applied to the sprite.
Sourcepub fn oriented_offset(&self) -> Vector
pub fn oriented_offset(&self) -> Vector
Offsets the center of the sprite or animation if orientation_target is given. This offset will rotate together with the sprite or animation.
Sourcepub fn players(&self) -> LuaAny
pub fn players(&self) -> LuaAny
Players for which this object is visible or nil if visible to all players. Writing nil or empty array will make this object visible to all players.
Sourcepub fn render_layer(&self) -> LuaAny
pub fn render_layer(&self) -> LuaAny
Render layer of this sprite or animation.
Sourcepub fn render_mode(&self) -> ScriptRenderMode
pub fn render_mode(&self) -> ScriptRenderMode
Whether the object is rendered in game world or on the chart (map view).
When it is changed, the object is pushed to front of its new group.
Sourcepub fn right_bottom(&self) -> LuaAny
pub fn right_bottom(&self) -> LuaAny
Where bottom right corner of this rectangle is drawn.
Sourcepub fn scale_with_zoom(&self) -> bool
pub fn scale_with_zoom(&self) -> bool
If this text scales with player zoom.
Sourcepub fn sprite(&self) -> SpritePath
pub fn sprite(&self) -> SpritePath
Sprite of the sprite or light.
Sourcepub fn start_angle(&self) -> f32
pub fn start_angle(&self) -> f32
Where this arc starts. Angle in radian.
Sourcepub fn surface(&self) -> LuaSurface
pub fn surface(&self) -> LuaSurface
Surface this object is rendered on.
Sourcepub fn target(&self) -> LuaAny
pub fn target(&self) -> LuaAny
Where this object is drawn.
Polygon vertices that are set to an entity will ignore this.
Sourcepub fn time_to_live(&self) -> u32
pub fn time_to_live(&self) -> u32
Time to live of this object. This will be 0 if the object does not expire.
Sourcepub fn type(&self) -> LuaRenderObjectType
pub fn type(&self) -> LuaRenderObjectType
Type of this object.
Sourcepub fn use_rich_text(&self) -> bool
pub fn use_rich_text(&self) -> bool
If this text parses rich text tags.
Sourcepub fn use_target_orientation(&self) -> bool
pub fn use_target_orientation(&self) -> bool
If this object uses the target orientation.
Sourcepub fn valid(&self) -> bool
pub fn valid(&self) -> bool
Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be false. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
Sourcepub fn vertical_alignment(&self) -> VerticalTextAlign
pub fn vertical_alignment(&self) -> VerticalTextAlign
Vertical alignment of this text.
Sourcepub fn bring_to_front(&self)
pub fn bring_to_front(&self)
Reorder this object so that it is drawn in front of the already existing objects.
Sourcepub fn move_to_back(&self)
pub fn move_to_back(&self)
Reorder this object so that it is drawn in the back of the already existing objects.
Sourcepub fn set_corners(&self, left_top: LuaAny, right_bottom: LuaAny)
pub fn set_corners(&self, left_top: LuaAny, right_bottom: LuaAny)
Set the corners of the rectangle with this id.
Sourcepub fn set_dashes(&self, dash_length: f64, gap_length: f64)
pub fn set_dashes(&self, dash_length: f64, gap_length: f64)
Set the length of the dashes and the length of the gaps in this line.
Trait Implementations§
Source§impl Clone for LuaRenderObject
impl Clone for LuaRenderObject
Source§fn clone(&self) -> LuaRenderObject
fn clone(&self) -> LuaRenderObject
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more