pub struct LuaDisplayPanelControlBehavior;Expand description
Control behavior for display panels.
Implementations§
Source§impl LuaDisplayPanelControlBehavior
impl LuaDisplayPanelControlBehavior
Sourcepub fn input_networks(&self) -> CircuitNetworkSelection
pub fn input_networks(&self) -> CircuitNetworkSelection
Which circuit networks (red/green) to read signals from. Defaults to both wire colors.
nil if this control behavior does not allow selecting the input networks.
Sourcepub fn output_networks(&self) -> CircuitNetworkSelection
pub fn output_networks(&self) -> CircuitNetworkSelection
Which circuit networks (red/green) to send signals to. Defaults to both wire colors.
nil if this control behavior does not allow selecting the output networks.
Sourcepub fn max_records_count(&self) -> u32
pub fn max_records_count(&self) -> u32
Provides a maximum amount of records that can be added to this behavior. When at full capacity, attempts to add more records will fail.
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 records(&self) -> Vec<DisplayPanelMessageDefinition>
pub fn records(&self) -> Vec<DisplayPanelMessageDefinition>
The full list of configured messages.
Sourcepub fn records_count(&self) -> u32
pub fn records_count(&self) -> u32
Current amount of records this control behavior has.
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.
pub fn get_circuit_network( &self, wire_connector_id: &str, ) -> Option<LuaCircuitNetwork>
Sourcepub fn add_record(
&self,
index: Option<u32>,
message: DisplayPanelMessageDefinition,
) -> bool
pub fn add_record( &self, index: Option<u32>, message: DisplayPanelMessageDefinition, ) -> bool
Adds a single message record.
Sourcepub fn get_record(&self, index: u32) -> DisplayPanelMessageDefinition
pub fn get_record(&self, index: u32) -> DisplayPanelMessageDefinition
Get a single record.
Sourcepub fn move_record(&self, new_index: u32, old_index: u32)
pub fn move_record(&self, new_index: u32, old_index: u32)
Moves record from old position to a new position
Sourcepub fn remove_record(&self, index: u32)
pub fn remove_record(&self, index: u32)
Removes message record at specified index.
Sourcepub fn set_record(&self, index: u32, record: DisplayPanelMessageDefinition)
pub fn set_record(&self, index: u32, record: DisplayPanelMessageDefinition)
Change content of a specific record.
Trait Implementations§
Source§impl Clone for LuaDisplayPanelControlBehavior
impl Clone for LuaDisplayPanelControlBehavior
Source§fn clone(&self) -> LuaDisplayPanelControlBehavior
fn clone(&self) -> LuaDisplayPanelControlBehavior
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more