Home

LuaConstantCombinatorControlBehavior

Control behavior for constant combinators.

Parent

Attributes

enabled

Turns this constant combinator on and off.

sections

All logistic sections of this constant combinator.

sections_count

Amount of logistic sections this constant combinator has.

valid

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

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.

Methods

add_section

LuaConstantCombinatorControlBehavior.add_section(group?: string) -> LuaLogisticSection?

Call As

constantCombinatorControlBehavior.add_section()

Call Convention

Adds a new logistic section to this constant combinator if possible.

Parameters

Returns

remove_section

LuaConstantCombinatorControlBehavior.remove_section(section_index: uint32) -> boolean

Call As

constantCombinatorControlBehavior.remove_section(section_index)

Call Convention

Removes the given logistic section if possible. Removal may fail if the section index is out of range or the section is not manual.

Parameters

Returns

get_section

LuaConstantCombinatorControlBehavior.get_section(section_index: uint32) -> LuaLogisticSection?

Call As

constantCombinatorControlBehavior.get_section(section_index)

Call Convention

Gets section on the selected index, if it exists.

Parameters

Returns