Home

LuaLogisticSections

Logistic sections of an entity.

Attributes

sections

All logistic sections of this entity.

sections_count

Amount of logistic sections this entity 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

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

Call As

logisticSections.add_section()

Call Convention

Adds a new logistic section if possible.

Parameters

Returns

remove_section

LuaLogisticSections.remove_section(section_index: uint32) -> boolean

Call As

logisticSections.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

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

Call As

logisticSections.get_section(section_index)

Call Convention

Gets section on the selected index, if it exists.

Parameters

Returns