Factorio Runtime DocsVersion 2.0.14

ClassLuaLogisticSectionnew

Logistic section of a particular LuaLogisticPoint or LuaConstantCombinatorControlBehavior.

Members

set_slot(slot_index, filter)

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

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

get_slot(slot_index) LogisticFilter

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

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

clear_slot(slot_index)

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

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

owner :: R LuaEntity

The LuaEntity owner of this LuaLogisticSection.

The LuaEntity owner of this LuaLogisticSection.

index :: R uint

The section index of this section.

The section index of this section.

filters :: RW array[LogisticFilter]

The logistic filters for this section. [...]

The logistic filters for this section. [...]

filters_count :: R uint

Amount of filters this section has

Amount of filters this section has

group :: RW string

The group this section belongs to. [...]

The group this section belongs to. [...]

type :: R defines.logistic_section_type

The type of this logistic section. [...]

The type of this logistic section. [...]

is_manual :: R boolean

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

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

active :: RW boolean

Whether this section is active. [...]

Whether this section is active. [...]

multiplier :: RW float

Multiplier applied to all filters before they are used by game. [...]

Multiplier applied to all filters before they are used by game. [...]

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. [...]

Methods

set_slot(slot_index, filter)

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

slot_index :: LogisticFilterIndex

Index of a slot to set.

Index of a slot to set.

filter :: LogisticFilter

The details of the filter to set.

The details of the filter to set.

Raised events

on_entity_logistic_slot_changed? instantly

Raised if setting of logistic slot was successful.


get_slot(slot_index) → LogisticFilter

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

Parameters

slot_index :: LogisticFilterIndex

Index of a slot to read.

Index of a slot to read.


clear_slot(slot_index)

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

This can only be called when the section is manual.

Parameters

slot_index :: LogisticFilterIndex

Index of a slot to clear.

Index of a slot to clear.

Attributes

owner :: Read LuaEntity  

The LuaEntity owner of this LuaLogisticSection.


index :: Read uint  

The section index of this section.


filters :: Read|Write array[LogisticFilter]  

The logistic filters for this section.

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


filters_count :: Read uint  

Amount of filters this section has


group :: Read|Write string  

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 :: Read defines.logistic_section_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 :: Read boolean  

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


active :: Read|Write boolean  

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


multiplier :: Read|Write float  

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


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.

Classes

Concepts

Events

Defines