]> git.lizzy.rs Git - dragonfireclient.git/blob - builtin/detached_inventory.lua
Update default controls in README and pause menu
[dragonfireclient.git] / builtin / detached_inventory.lua
1 -- Minetest: builtin/detached_inventory.lua
2
3 minetest.detached_inventories = {}
4
5 function minetest.create_detached_inventory(name, callbacks)
6         local stuff = {}
7         stuff.name = name
8         if callbacks then
9                 stuff.allow_move = callbacks.allow_move
10                 stuff.allow_put = callbacks.allow_put
11                 stuff.allow_take = callbacks.allow_take
12                 stuff.on_move = callbacks.on_move
13                 stuff.on_put = callbacks.on_put
14                 stuff.on_take = callbacks.on_take
15         end
16         minetest.detached_inventories[name] = stuff
17         return minetest.create_detached_inventory_raw(name)
18 end
19