One line on a transport belt.
clear() |
Remove all items from this transport line. |
|
Remove all items from this transport line. |
||
get_item_count(item?) | → uint |
Count some or all items on this line, similar to how LuaInventory::get_item_count does. |
Count some or all items on this line, similar to how LuaInventory::get_item_count does. |
||
remove_item(items) | → uint |
Remove some items from this line. |
Remove some items from this line. |
||
can_insert_at(position) | → boolean |
Can an item be inserted at a given position? |
Can an item be inserted at a given position? |
||
can_insert_at_back() | → boolean |
Can an item be inserted at the back of this line? |
Can an item be inserted at the back of this line? |
||
insert_at(position, items) | → boolean |
Insert items at a given position. |
Insert items at a given position. |
||
insert_at_back(items) | → boolean |
Insert items at the back of this line. |
Insert items at the back of this line. |
||
get_contents() | → dictionary[string → uint] |
Get counts of all items on this line, similar to how LuaInventory::get_contents does. |
Get counts of all items on this line, similar to how LuaInventory::get_contents does. |
||
line_equals(other) | → boolean |
Returns whether the associated internal transport line of this line is the same as the others associated internal transport line. |
Returns whether the associated internal transport line of this line is the same as the others associated internal transport line. |
||
help() | → string |
All methods and properties that this object supports. |
All methods and properties that this object supports. |
||
owner [R] | :: LuaEntity |
The entity this transport line belongs to. |
The entity this transport line belongs to. |
||
output_lines [R] | :: array[LuaTransportLine] |
The transport lines that this transport line outputs items to or an empty table if none. |
The transport lines that this transport line outputs items to or an empty table if none. |
||
input_lines [R] | :: array[LuaTransportLine] |
The transport lines that this transport line is fed by or an empty table if none. |
The transport lines that this transport line is fed by or an empty table if none. |
||
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. |
||
# (length) [R] | :: uint |
Get the number of items on this transport line. |
Get the number of items on this transport line. |
||
[] (index) [R] | :: LuaItemStack |
The indexing operator. |
The indexing operator. |
Count some or all items on this line, similar to how LuaInventory::get_item_count does.
item | :: string? |
Prototype name of the item to count. If not specified, count all items. |
Prototype name of the item to count. If not specified, count all items. |
Remove some items from this line.
items | :: ItemStackIdentification |
Items to remove. |
Items to remove. |
→ uint |
Number of items actually removed. |
Can an item be inserted at a given position?
position | :: float |
Where to insert an item. |
Where to insert an item. |
Can an item be inserted at the back of this line?
Insert items at a given position.
position | :: float |
Where on the line to insert the items. |
Where on the line to insert the items. |
||
items | :: ItemStackIdentification |
Items to insert. |
Items to insert. |
→ boolean |
Were the items inserted successfully? |
Insert items at the back of this line.
items | :: ItemStackIdentification |
|
→ boolean |
Were the items inserted successfully? |
Get counts of all items on this line, similar to how LuaInventory::get_contents does.
→ dictionary[string → uint] |
The counts, indexed by item names. |
Returns whether the associated internal transport line of this line is the same as the others associated internal transport line.
other | :: LuaTransportLine |
|
This can return true even when the LuaTransportLine::owners are different (so this == other
is false), because the internal transport lines can span multiple tiles.
All methods and properties that this object supports.
The entity this transport line belongs to.
The transport lines that this transport line outputs items to or an empty table if none.
The transport lines that this transport line is fed by or an empty table if none.
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.
Get the number of items on this transport line.
The indexing operator.