A single logistic network of a given force on a given surface.
get_item_count(item?, member?) | → int |
Count given or all items in the network or given members. |
Count given or all items in the network or given members. |
||
get_contents() | → dictionary[string → uint] |
Get item counts for the entire network, similar to how LuaInventory::get_contents does. |
Get item counts for the entire network, similar to how LuaInventory::get_contents does. |
||
remove_item(item, members?) | → uint |
Remove items from the logistic network. |
Remove items from the logistic network. |
||
insert(item, members?) | → uint |
Insert items into the logistic network. |
Insert items into the logistic network. |
||
find_cell_closest_to(position) | → LuaLogisticCell? |
Find logistic cell closest to a given position. |
Find logistic cell closest to a given position. |
||
select_pickup_point{name=…, position?=…, include_buffers?=…, members?=…} | → LuaLogisticPoint? |
Find the 'best' logistic point with this item ID and from the given position or from given chest type. |
Find the 'best' logistic point with this item ID and from the given position or from given chest type. |
||
select_drop_point{stack=…, members?=…} | → LuaLogisticPoint? |
Find a logistic point to drop the specific item stack. |
Find a logistic point to drop the specific item stack. |
||
can_satisfy_request(item, count?, include_buffers?) | → boolean |
Can the network satisfy a request for a given item and count. |
Can the network satisfy a request for a given item and count. |
||
get_supply_counts(item) | → dictionary[string → uint] |
Get the amount of items of the given type indexed by the storage member. |
Get the amount of items of the given type indexed by the storage member. |
||
get_supply_points(item) | → dictionary[string → array[LuaLogisticPoint]] |
Gets the logistic points with of the given type indexed by the storage member. |
Gets the logistic points with of the given type indexed by the storage member. |
||
help() | → string |
All methods and properties that this object supports. |
All methods and properties that this object supports. |
||
force [R] | :: LuaForce |
The force this logistic network belongs to. |
The force this logistic network belongs to. |
||
available_logistic_robots [R] | :: uint |
Number of logistic robots available for a job. |
Number of logistic robots available for a job. |
||
all_logistic_robots [R] | :: uint |
The total number of logistic robots in the network (idle and active + in roboports). |
The total number of logistic robots in the network (idle and active + in roboports). |
||
available_construction_robots [R] | :: uint |
Number of construction robots available for a job. |
Number of construction robots available for a job. |
||
all_construction_robots [R] | :: uint |
The total number of construction robots in the network (idle and active + in roboports). |
The total number of construction robots in the network (idle and active + in roboports). |
||
robot_limit [R] | :: uint |
Maximum number of robots the network can work with. |
Maximum number of robots the network can work with. |
||
cells [R] | :: array[LuaLogisticCell] |
All cells in this network. |
All cells in this network. |
||
providers [R] | :: array[LuaEntity] |
All entities that have logistic provider points in this network. |
All entities that have logistic provider points in this network. |
||
empty_providers [R] | :: array[LuaEntity] |
All entities that have empty logistic provider points in this network. |
All entities that have empty logistic provider points in this network. |
||
requesters [R] | :: array[LuaEntity] |
All entities that have logistic requester points in this network. |
All entities that have logistic requester points in this network. |
||
storages [R] | :: array[LuaEntity] |
All entities that have logistic storage points in this network. |
All entities that have logistic storage points in this network. |
||
logistic_members [R] | :: array[LuaEntity] |
All other entities that have logistic points in this network (inserters mostly). |
All other entities that have logistic points in this network (inserters mostly). |
||
provider_points [R] | :: array[LuaLogisticPoint] |
All things that have provider points in this network. |
All things that have provider points in this network. |
||
passive_provider_points [R] | :: array[LuaLogisticPoint] |
All passive provider points in this network. |
All passive provider points in this network. |
||
active_provider_points [R] | :: array[LuaLogisticPoint] |
All active provider points in this network. |
All active provider points in this network. |
||
empty_provider_points [R] | :: array[LuaLogisticPoint] |
All things that have empty provider points in this network. |
All things that have empty provider points in this network. |
||
requester_points [R] | :: array[LuaLogisticPoint] |
All things that have requester points in this network. |
All things that have requester points in this network. |
||
storage_points [R] | :: array[LuaLogisticPoint] |
All things that have storage points in this network. |
All things that have storage points in this network. |
||
robots [R] | :: array[LuaEntity] |
All robots in this logistic network. |
All robots in this logistic network. |
||
construction_robots [R] | :: array[LuaEntity] |
All construction robots in this logistic network. |
All construction robots in this logistic network. |
||
logistic_robots [R] | :: array[LuaEntity] |
All logistic robots in this logistic network. |
All logistic robots in this logistic network. |
||
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. |
Count given or all items in the network or given members.
item | :: string? |
Item name to count. If not given, gives counts of all items in the network. |
Item name to count. If not given, gives counts of all items in the network. |
||
member | :: string? |
Logistic members to check, must be either |
Logistic members to check, must be either |
Get item counts for the entire network, similar to how LuaInventory::get_contents does.
→ dictionary[string → uint] |
A mapping of item prototype names to the number available in the network. |
Remove items from the logistic network. This will actually remove the items from some logistic chests.
item | :: ItemStackIdentification |
What to remove. |
What to remove. |
||
members | :: string? |
Which logistic members to remove from. Must be |
Which logistic members to remove from. Must be |
→ uint |
Number of items removed. |
Insert items into the logistic network. This will actually insert the items into some logistic chests.
item | :: ItemStackIdentification |
What to insert. |
What to insert. |
||
members | :: string? |
Which logistic members to insert the items to. Must be |
Which logistic members to insert the items to. Must be |
→ uint |
Number of items actually inserted. |
Find logistic cell closest to a given position.
position | :: MapPosition |
|
→ LuaLogisticCell? |
|
Find the 'best' logistic point with this item ID and from the given position or from given chest type.
name | :: string |
Name of the item to select. |
Name of the item to select. |
||
position | :: MapPosition? |
When given, it will find the storage 'best' storage point from this position. |
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. |
Whether to consider buffer chests or not. Defaults to false. Only considered if selecting with position. |
||
members | :: string? |
When given, it will find from only the specific type of member. Must be |
When given, it will find from only the specific type of member. Must be |
→ LuaLogisticPoint? |
|
Find a logistic point to drop the specific item stack.
stack | :: ItemStackIdentification |
Name of the item to select. |
Name of the item to select. |
||
members | :: string? |
When given, it will find from only the specific type of member. Must be |
When given, it will find from only the specific type of member. Must be |
→ LuaLogisticPoint? |
|
Can the network satisfy a request for a given item and count.
item | :: string |
Item name to check. |
Item name to check. |
||
count | :: uint? |
Count to check. Defaults to 1. |
Count to check. Defaults to 1. |
||
include_buffers | :: boolean? |
Should buffers be considered? Defaults to false. |
Should buffers be considered? Defaults to false. |
→ boolean |
Whether the network can satisfy the request. |
Get the amount of items of the given type indexed by the storage member.
item | :: string |
Item name to check. |
Item name to check. |
→ dictionary[string → uint] |
A mapping of member types ("storage", "passive-provider", "buffer", "active-provider") to the number available in the members. |
Gets the logistic points with of the given type indexed by the storage member.
item | :: string |
Item name to check. |
Item name to check. |
→ dictionary[string → array[LuaLogisticPoint]] |
A mapping of member types ("storage", "passive-provider", "buffer", "active-provider") to an array of LuaLogisticPoint. |
All methods and properties that this object supports.
The force this logistic network belongs to.
Number of logistic robots available for a job.
The total number of logistic robots in the network (idle and active + in roboports).
Number of construction robots available for a job.
The total number of construction robots in the network (idle and active + in roboports).
Maximum number of robots the network can work with. Currently only used for the personal roboport.
All cells in this network.
All entities that have logistic provider points in this network.
All entities that have empty logistic provider points in this network.
All entities that have logistic requester points in this network.
All entities that have logistic storage points in this network.
All other entities that have logistic points in this network (inserters mostly).
All things that have provider points in this network.
All passive provider points in this network.
All active provider points in this network.
All things that have empty provider points in this network.
All things that have requester points in this network.
All things that have storage points in this network.
All robots in this logistic network.
All construction robots in this logistic network.
All logistic robots in this logistic network.
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.
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.