Home

LuaLogisticSection

Logistic section of a particular LuaLogisticPoint or LuaConstantCombinatorControlBehavior.

Attributes

owner

The LuaEntity owner of this LuaLogisticSection.

index

The section index of this section.

filters

The logistic filters for this section.

This can only be written to when the section is manual.

filters_count

Amount of filters this section has

group

The group this section belongs to.

An empty string when in no group.

This can only be written to when the section is manual.

type

The type of this logistic section. Sections that are not manual are controlled by game itself and may not be allowed to be changed by script.

is_manual

Shortcut to check whether LuaLogisticSection::type is equal to manual.

active

Whether this section is active. This can only be written to when the section is manual.

multiplier

Multiplier applied to all filters before they are used by game. This can only be written to when the section is manual.

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

set_slot

LuaLogisticSection.set_slot(slot_index: LogisticFilterIndex, filter: LogisticFilter) -> LogisticFilterIndex?

Call As

logisticSection.set_slot(slot_index, filter)

Call Convention

Sets logistic request and auto-trash slot to the given value.

This will silently fail if personal logistics are not researched yet.

This can only be called when the section is manual.

Parameters

Returns

get_slot

LuaLogisticSection.get_slot(slot_index: LogisticFilterIndex) -> LogisticFilter

Call As

logisticSection.get_slot(slot_index)

Call Convention

Gets current settings of logistic request and auto-trash from the given slot.

Parameters

Returns

clear_slot

LuaLogisticSection.clear_slot(slot_index: LogisticFilterIndex)

Call As

logisticSection.clear_slot(slot_index)

Call Convention

Clears the logistic request and auto-trash from the given slot.

This can only be called when the section is manual.

Parameters