Factorio Runtime DocsVersion 2.1.9

LuaDisplayPanelControlBehavior - Runtime Docs

ClassLuaDisplayPanelControlBehaviorextendsLuaControlBehaviorchanged

Control behavior for display panels.

Inherits from LuaControlBehavior

Members

add_record(message, index?) newboolean

Adds a single message record.

Adds a single message record.

remove_record(index) new

Removes message record at specified index.

Removes message record at specified index.

move_record(old_index, new_index) new

Moves record from old position to a new position

Moves record from old position to a new position

get_record(index) newDisplayPanelMessageDefinition

Get a single record.

Get a single record.

set_record(index, record) new

Change content of a specific record.

Change content of a specific record.

max_records_count new :: R uint32

Provides a maximum amount of records that can be added to this behavior. [...]

Provides a maximum amount of records that can be added to this behavior. [...]

records_count new :: R uint32

Current amount of records this control behavior has.

Current amount of records this control behavior has.

records new :: RW array[DisplayPanelMessageDefinition]

The full list of configured messages.

The full list of configured messages.

valid :: R boolean

Is this object valid? [...]

Is this object valid? [...]

object_name :: R string

The class name of this object. [...]

The class name of this object. [...]

Inherited from LuaControlBehavior
get_circuit_network(wire_connector_id) LuaCircuitNetwork?
input_networks new :: RW CircuitNetworkSelection?

Which circuit networks (red/green) to read signals from. [...]

Which circuit networks (red/green) to read signals from. [...]

output_networks new :: RW CircuitNetworkSelection?

Which circuit networks (red/green) to send signals to. [...]

Which circuit networks (red/green) to send signals to. [...]

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

add_record(message, index?) → booleannew

Adds a single message record.

Parameters

message :: DisplayPanelMessageDefinition

Message record to be added.

Message record to be added.

index :: uint32?

Index at which this record should be inserted. Must be within [1, records_count + 1]. When not provided, record will be appended.

Index at which this record should be inserted. Must be within [1, records_count + 1]. When not provided, record will be appended.

Return values

→ boolean

If a message record was added.


remove_record(index)new

Removes message record at specified index.

Parameters

index :: uint32

Index of the message record to be removed. Must be within [1, records_count].

Index of the message record to be removed. Must be within [1, records_count].


move_record(old_index, new_index)new

Moves record from old position to a new position

Parameters

old_index :: uint32

Index where the record to be moved is currently.

Index where the record to be moved is currently.

new_index :: uint32

Index where the record should be moved to.

Index where the record should be moved to.


get_record(index) → DisplayPanelMessageDefinitionnew

Get a single record.

Parameters

index :: uint32

Index of the record to read.

Index of the record to read.


set_record(index, record)new

Change content of a specific record.

Parameters

index :: uint32

Index of the record to change

Index of the record to change

record :: DisplayPanelMessageDefinition

Attributes

max_records_count :: Read uint32new

Provides a maximum amount of records that can be added to this behavior. When at full capacity, attempts to add more records will fail.


records_count :: Read uint32new

Current amount of records this control behavior has.


records :: Read|Write array[DisplayPanelMessageDefinition] new

The full list of configured messages.


valid :: Read boolean

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.


object_name :: Read string

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.

Fulltext search

Classes

Concepts

Events

Defines

Fulltext search for