A single logistic network of a given force on a given surface.
uint32unknownfalseThe unique logistic network ID.
stringstringtrueThe custom logistic network name set by the player or by script, if any.
LuaForceunknownfalseThe force this logistic network belongs to.
uint32unknownfalseNumber of logistic robots available for a job.
uint32unknownfalseThe total number of logistic robots in the network (idle and active + in roboports).
uint32unknownfalseNumber of construction robots available for a job.
uint32unknownfalseThe total number of construction robots in the network (idle and active + in roboports).
uint32unknownfalseMaximum number of robots the network can work with. Currently only used for the personal roboport.
Array<LuaLogisticCell>unknownfalseAll cells in this network.
Array<LuaEntity>unknownfalseAll entities that have logistic provider points in this network.
Array<LuaEntity>unknownfalseAll entities that have empty logistic provider points in this network.
Array<LuaEntity>unknownfalseAll entities that have logistic requester points in this network.
Array<LuaEntity>unknownfalseAll entities that have logistic storage points in this network.
Array<LuaEntity>unknownfalseAll other entities that have logistic points in this network (inserters mostly).
Array<LuaLogisticPoint>unknownfalseAll things that have provider points in this network.
Array<LuaLogisticPoint>unknownfalseAll passive provider points in this network.
Array<LuaLogisticPoint>unknownfalseAll active provider points in this network.
Array<LuaLogisticPoint>unknownfalseAll things that have empty provider points in this network.
Array<LuaLogisticPoint>unknownfalseAll things that have requester points in this network.
Array<LuaLogisticPoint>unknownfalseAll things that have storage points in this network.
Array<LuaEntity>unknownfalseAll robots in this logistic network.
Array<LuaEntity>unknownfalseAll construction robots in this logistic network.
Array<LuaEntity>unknownfalseAll logistic robots in this logistic network.
booleanunknownfalseIs 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.
stringunknownfalseThe 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.
LuaLogisticNetwork.get_item_count(item?: ItemWithQualityID, member?: "storage" | "providers") -> int32
logisticNetwork.get_item_count()
takes_table: falsetable_optional: falseCount given or all items in the network or given members.
item?: ItemWithQualityID — Item name to count. If not given, gives counts of all items in the network.member?: "storage" | "providers" — Logistic members to check. If not given, gives count in the entire network.int32LuaLogisticNetwork.get_contents(member?: "storage" | "providers") -> ItemWithQualityCounts
logisticNetwork.get_contents()
takes_table: falsetable_optional: falseGet item counts for the entire network, similar to how LuaInventory::get_contents does.
member?: "storage" | "providers" — Logistic members to check. If not given, gives item counts for the entire network.ItemWithQualityCounts — List of all items in the network.LuaLogisticNetwork.remove_item(item: ItemStackIdentification, members?: "active-provider" | "passive-provider" | "buffer" | "storage") -> uint32
logisticNetwork.remove_item(item, members)
takes_table: falsetable_optional: falseRemove items from the logistic network. This will actually remove the items from some logistic chests.
item: ItemStackIdentification — What to remove.members?: "active-provider" | "passive-provider" | "buffer" | "storage" — Which logistic members to remove from. If not specified, removes from the network in the usual order.uint32 — Number of items removed.LuaLogisticNetwork.insert(item: ItemStackIdentification, members?: "storage" | "storage-empty" | "storage-empty-slot" | "requester") -> uint32
logisticNetwork.insert(item, members)
takes_table: falsetable_optional: falseInsert items into the logistic network. This will actually insert the items into some logistic chests.
item: ItemStackIdentification — What to insert.members?: "storage" | "storage-empty" | "storage-empty-slot" | "requester" — Which logistic members to insert the items to. "storage-empty" inserts into storage chests that are completely empty, "storage-empty-slot" inserts into storage chests that have an empty slot. If not specified, inserts items into the logistic network in the usual order.uint32 — Number of items actually inserted.LuaLogisticNetwork.find_cell_closest_to(position: MapPosition) -> LuaLogisticCell?
logisticNetwork.find_cell_closest_to(position)
takes_table: falsetable_optional: falseFind logistic cell closest to a given position.
position: MapPositionLuaLogisticCell? — nil if no cell was found.LuaLogisticNetwork.select_pickup_point{ name: ItemWithQualityID, position?: MapPosition, include_buffers?: boolean, members?: "active-provider" | "passive-provider" | "buffer" | "storage" } -> LuaLogisticPoint?
logisticNetwork.select_pickup_point{ name="name" }
takes_table: truetable_optional: falseFind the 'best' logistic point with this item ID and from the given position or from given chest type.
name: ItemWithQualityID — Name of the item to pick up.position?: MapPosition — When given, it will find the storage 'best' storage point from this position.include_buffers?: boolean — Whether to consider buffer chests or not. Defaults to false. Only considered if selecting with position.members?: "active-provider" | "passive-provider" | "buffer" | "storage" — When given, it will find from only the specific type of member. If not specified, selects with normal priorities. Not considered if position is specified.LuaLogisticPoint? — nil if no point was found.LuaLogisticNetwork.select_drop_point{ stack: ItemStackIdentification, members?: "storage" | "storage-empty" | "storage-empty-slot" | "requester" } -> LuaLogisticPoint?
logisticNetwork.select_drop_point{ stack=stack }
takes_table: truetable_optional: falseFind a logistic point to drop the specific item stack.
stack: ItemStackIdentification — Name of the item to drop off.members?: "storage" | "storage-empty" | "storage-empty-slot" | "requester" — When given, it will find from only the specific type of member. If not specified, selects with normal priorities.LuaLogisticPoint? — nil if no point was found.LuaLogisticNetwork.can_satisfy_request(item: ItemWithQualityID, count?: uint32, include_buffers?: boolean) -> boolean
logisticNetwork.can_satisfy_request(item, count)
takes_table: falsetable_optional: falseCan the network satisfy a request for a given item and count.
item: ItemWithQualityID — Item name to check.count?: uint32 — Count to check. Defaults to 1.include_buffers?: boolean — Should buffers be considered? Defaults to false.boolean — Whether the network can satisfy the request.LuaLogisticNetwork.get_supply_counts(item: ItemWithQualityID) -> LogisticsNetworkSupplyCounts
logisticNetwork.get_supply_counts(item)
takes_table: falsetable_optional: falseGet the amount of items of the given type indexed by the storage member.
item: ItemWithQualityID — Item name to check.LogisticsNetworkSupplyCountsLuaLogisticNetwork.get_supply_points(item: ItemWithQualityID) -> LogisticsNetworkSupplyPoints
logisticNetwork.get_supply_points(item)
takes_table: falsetable_optional: falseGets the logistic points with of the given type indexed by the storage member.
item: ItemWithQualityID — Item name to check.LogisticsNetworkSupplyPoints