Zooming the camera requires the 'zoom' privilege
[oweals/minetest.git] / builtin / game / detached_inventory.lua
1 -- Minetest: builtin/detached_inventory.lua
2
3 core.detached_inventories = {}
4
5 function core.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         stuff.mod_origin = core.get_current_modname() or "??"
17         core.detached_inventories[name] = stuff
18         return core.create_detached_inventory_raw(name)
19 end
20