pub struct LuaControlBehavior;Expand description
The control behavior for an entity. Inserters have logistic network and circuit network behavior logic, lamps have circuit logic and so on. This is an abstract base class that concrete control behaviors inherit.
An control reference becomes invalid once the control behavior is removed or the entity (see LuaEntity) it resides in is destroyed.
Implementations§
Source§impl LuaControlBehavior
impl LuaControlBehavior
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.
pub fn get_circuit_network( &self, wire_connector_id: &str, ) -> Option<LuaCircuitNetwork>
Trait Implementations§
Source§impl Clone for LuaControlBehavior
impl Clone for LuaControlBehavior
Source§fn clone(&self) -> LuaControlBehavior
fn clone(&self) -> LuaControlBehavior
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for LuaControlBehavior
Source§impl Debug for LuaControlBehavior
impl Debug for LuaControlBehavior
Source§impl Default for LuaControlBehavior
impl Default for LuaControlBehavior
Source§fn default() -> LuaControlBehavior
fn default() -> LuaControlBehavior
Returns the “default value” for a type. Read more
impl Eq for LuaControlBehavior
Source§impl From<LuaControlBehavior> for LuaAny
impl From<LuaControlBehavior> for LuaAny
Source§fn from(_: LuaControlBehavior) -> Self
fn from(_: LuaControlBehavior) -> Self
Converts to this type from the input type.
impl LuaObject for LuaControlBehavior
Source§impl PartialEq for LuaControlBehavior
impl PartialEq for LuaControlBehavior
impl StructuralPartialEq for LuaControlBehavior
Auto Trait Implementations§
impl Freeze for LuaControlBehavior
impl RefUnwindSafe for LuaControlBehavior
impl Send for LuaControlBehavior
impl Sync for LuaControlBehavior
impl Unpin for LuaControlBehavior
impl UnsafeUnpin for LuaControlBehavior
impl UnwindSafe for LuaControlBehavior
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more