pub struct LuaCircuitNetwork;Expand description
A circuit network associated with a given entity, connector, and wire type.
Implementations§
Source§impl LuaCircuitNetwork
impl LuaCircuitNetwork
Sourcepub fn connected_circuit_count(&self) -> u32
pub fn connected_circuit_count(&self) -> u32
The number of circuits connected to this network.
Sourcepub fn entity(&self) -> LuaEntity
pub fn entity(&self) -> LuaEntity
The entity this circuit network reference is associated with.
Sourcepub fn network_id(&self) -> u32
pub fn network_id(&self) -> u32
The circuit networks ID.
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 signals(&self) -> Vec<Signal>
pub fn signals(&self) -> Vec<Signal>
The circuit network signals last tick. nil if there were no signals last tick.
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 wire_connector_id(&self) -> &str
pub fn wire_connector_id(&self) -> &str
Wire connector ID on associated entity this network was gotten from.
pub fn get_signal(&self, signal: SignalID) -> i32
Trait Implementations§
Source§impl Clone for LuaCircuitNetwork
impl Clone for LuaCircuitNetwork
Source§fn clone(&self) -> LuaCircuitNetwork
fn clone(&self) -> LuaCircuitNetwork
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more