Factorio Runtime Docs

Class LuaControlBehavior abstract

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.

Note

An control reference becomes invalid once the control behavior is removed or the entity (see LuaEntity) it resides in is destroyed.

Members

get_circuit_network(wire, circuit_connector?)  → LuaCircuitNetwork
type [R] :: defines.control_behavior.type

The concrete type of this control behavior.

The concrete type of this control behavior.

entity [R] :: LuaEntity

The entity this control behavior belongs to.

The entity this control behavior belongs to.

Methods

get_circuit_network(wire, circuit_connector?)  → LuaCircuitNetwork

Parameters

wire :: defines.wire_type

Wire color of the network connected to this entity.

Wire color of the network connected to this entity.

circuit_connector :: defines.circuit_connector_id?

The connector to get circuit network for. Must be specified for entities with more than one circuit network connector.

The connector to get circuit network for. Must be specified for entities with more than one circuit network connector.

Return values

→ LuaCircuitNetwork

The circuit network or nil.

Attributes

type :: defines.control_behavior.type Read

The concrete type of this control behavior.


entity :: LuaEntity Read

The entity this control behavior belongs to.

Classes

Events

Concepts

Defines

Builtin types

>|