---@meta ---@diagnostic disable --$Factorio 1.1.72 --$Overlay 5 --$Section LuaTransportLine -- This file is automatically generated. Edits will be overwritten. ---One line on a transport belt. --- ---[View documentation](https://lua-api.factorio.com/latest/LuaTransportLine.html) ---@class LuaTransportLine:LuaObject ---[R] ---The transport lines that this transport line is fed by or an empty table if none. --- ---[View documentation](https://lua-api.factorio.com/latest/LuaTransportLine.html#LuaTransportLine.input_lines) ---@field input_lines LuaTransportLine[] ---[R] ---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. --- ---[View documentation](https://lua-api.factorio.com/latest/LuaTransportLine.html#LuaTransportLine.object_name) ---@field object_name string ---[R] ---The transport lines that this transport line outputs items to or an empty table if none. --- ---[View documentation](https://lua-api.factorio.com/latest/LuaTransportLine.html#LuaTransportLine.output_lines) ---@field output_lines LuaTransportLine[] ---[R] ---The entity this transport line belongs to. --- ---[View documentation](https://lua-api.factorio.com/latest/LuaTransportLine.html#LuaTransportLine.owner) ---@field owner LuaEntity ---[R] ---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. --- ---[View documentation](https://lua-api.factorio.com/latest/LuaTransportLine.html#LuaTransportLine.valid) ---@field valid boolean ---[R] ---Get the number of items on this transport line. --- ---[View documentation](https://lua-api.factorio.com/latest/LuaTransportLine.html#LuaTransportLine.length) ---@operator len: uint ---[R] ---The indexing operator. --- ---[View documentation](https://lua-api.factorio.com/latest/LuaTransportLine.html#LuaTransportLine.index) ---@field [uint] LuaItemStack local LuaTransportLine={ ---Can an item be inserted at a given position? --- ---[View documentation](https://lua-api.factorio.com/latest/LuaTransportLine.html#LuaTransportLine.can_insert_at) ---@param position float@Where to insert an item. ---@return boolean can_insert_at=function(position)end, ---Can an item be inserted at the back of this line? --- ---[View documentation](https://lua-api.factorio.com/latest/LuaTransportLine.html#LuaTransportLine.can_insert_at_back) ---@return boolean can_insert_at_back=function()end, ---Remove all items from this transport line. --- ---[View documentation](https://lua-api.factorio.com/latest/LuaTransportLine.html#LuaTransportLine.clear) clear=function()end, ---Get counts of all items on this line, similar to how [LuaInventory::get_contents](https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.get_contents) does. --- ---[View documentation](https://lua-api.factorio.com/latest/LuaTransportLine.html#LuaTransportLine.get_contents) ---@return {[string]: uint}@The counts, indexed by item names. get_contents=function()end, ---Count some or all items on this line, similar to how [LuaInventory::get_item_count](https://lua-api.factorio.com/latest/LuaInventory.html#LuaInventory.get_item_count) does. --- ---[View documentation](https://lua-api.factorio.com/latest/LuaTransportLine.html#LuaTransportLine.get_item_count) ---@param item string?@Prototype name of the item to count. If not specified, count all items. ---@return uint get_item_count=function(item)end, ---All methods and properties that this object supports. --- ---[View documentation](https://lua-api.factorio.com/latest/LuaTransportLine.html#LuaTransportLine.help) ---@return string help=function()end, ---Insert items at a given position. --- ---[View documentation](https://lua-api.factorio.com/latest/LuaTransportLine.html#LuaTransportLine.insert_at) ---@param position float@Where on the line to insert the items. ---@param items ItemStackIdentification@Items to insert. ---@return boolean@Were the items inserted successfully? insert_at=function(position,items)end, ---Insert items at the back of this line. --- ---[View documentation](https://lua-api.factorio.com/latest/LuaTransportLine.html#LuaTransportLine.insert_at_back) ---@param items ItemStackIdentification ---@return boolean@Were the items inserted successfully? insert_at_back=function(items)end, ---Returns whether the associated internal transport line of this line is the same as the others associated internal transport line. --- ---**Note:** This can return true even when the [LuaTransportLine::owner](https://lua-api.factorio.com/latest/LuaTransportLine.html#LuaTransportLine.owner)s are different (so `this == other` is false), because the internal transport lines can span multiple tiles. --- ---[View documentation](https://lua-api.factorio.com/latest/LuaTransportLine.html#LuaTransportLine.line_equals) ---@param other LuaTransportLine ---@return boolean line_equals=function(other)end, ---Remove some items from this line. --- ---[View documentation](https://lua-api.factorio.com/latest/LuaTransportLine.html#LuaTransportLine.remove_item) ---@param items ItemStackIdentification@Items to remove. ---@return uint@Number of items actually removed. remove_item=function(items)end, }