For working with inventories.
local Inventory = require('__stdlib__/stdlib/entity/inventory')
copy_as_simple_stacks(src, dest[, clear=false]) | Copies the contents of source inventory to destination inventory by using Concepts.SimpleItemStack. |
each(inventory, func[, ...]) | Given a function, apply it to each slot in the given inventory. |
each_reverse(inventory, func[, ...]) | Given a function, apply it to each slot in the given inventory. |
get_blueprint(stack[, is_bp_setup][, no_book]) | Return a blueprint stack from either stack or blueprint_book |
get_item_or_filter(inventory, idx[, item_only][, filter_only]) | Returns either the item at a position, or the filter at the position if there isn’t an item there. |
is_named_bp(stack, label) | Is the stack a blueprint with label? |
Copies the contents of source inventory to destination inventory by using Concepts.SimpleItemStack.
Parameters:
Given a function, apply it to each slot in the given inventory.
Passes the index of a slot as the second argument to the given function.
Iteration is aborted if the applied function returns true for any element during iteration.
Parameters:Given a function, apply it to each slot in the given inventory.
Passes the index of a slot as the second argument to the given function.
Iteration is aborted if the applied function returns true for any element during iteration.
Iteration is performed from last to first in order to support dynamically sized inventories.
Parameters:Return a blueprint stack from either stack or blueprint_book
Parameters:
Returns either the item at a position, or the filter at the position if there isn’t an item there.
Parameters:
Is the stack a blueprint with label?
Parameters: