2 Use this API if you want to make an container compatible with vending and
7 * Add `easyvend` as optional dependency
8 * Check for existence of `easyvend` mod in code
9 * Call `easyvend.register_chest` for all containers you want to be compatible
11 ## `easyvend.register_chest = function(node_name, inv_list, meta_owner)`
12 Registers a node (called “chest”) for use with Easyvend. After calling this function,
13 the node will be recognized as storage for vending and depositing machines.
15 Easyvend makes the following assumptions about the chest:
17 * The inventory does not restrict the types of items you can put and take
18 * The chest is owned by a player
19 * The owner is specified in metadata
22 * `node_name`: Name of the chest node
23 * `inv_list`: Name of the inventory list for exchanging items
24 * `meta_owner`: Identifier of the metadata variable storing the owner name
28 Register the node `example:superchest` as container:
31 if minetest.get_modpath("easyvend") then
32 easyvend.register_chest("example:superchest", "main", "owner")
36 The `if` check is a common trick to check for the existence of the `easyvend`
37 and allows you to make the dependency optional.