pub struct LuaCustomChartTag;Expand description
A custom tag that shows on the map view.
Implementations§
Source§impl LuaCustomChartTag
impl LuaCustomChartTag
Sourcepub fn set_icon(&self, value: SignalID)
pub fn set_icon(&self, value: SignalID)
Set the icon attribute (Lua: self.icon = value).
This tag’s icon, if it has one. Writing nil removes it.
Sourcepub fn set_last_user(&self, value: PlayerIdentification)
pub fn set_last_user(&self, value: PlayerIdentification)
Set the last_user attribute (Lua: self.last_user = value).
The player who last edited this tag.
Sourcepub fn object_name(&self) -> &'static str
pub fn object_name(&self) -> &'static 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 position(&self) -> MapPosition
pub fn position(&self) -> MapPosition
The position of this tag.
Sourcepub fn set_position(&self, value: MapPosition)
pub fn set_position(&self, value: MapPosition)
Set the position attribute (Lua: self.position = value).
The position of this tag.
Sourcepub fn surface(&self) -> LuaSurface
pub fn surface(&self) -> LuaSurface
The surface this tag belongs to.
Sourcepub fn set_surface(&self, value: LuaSurface)
pub fn set_surface(&self, value: LuaSurface)
Set the surface attribute (Lua: self.surface = value).
The surface this tag belongs to.
Sourcepub fn tag_number(&self) -> u32
pub fn tag_number(&self) -> u32
The unique ID for this tag on this force.
pub fn text(&self) -> &'static str
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.
Trait Implementations§
Source§impl Clone for LuaCustomChartTag
impl Clone for LuaCustomChartTag
Source§fn clone(&self) -> LuaCustomChartTag
fn clone(&self) -> LuaCustomChartTag
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more