Inventories: Update chapter
This commit is contained in:
parent
bfc343d1f5
commit
51cf848657
@ -105,7 +105,6 @@ chest. The node must be loaded because it is stored in
|
||||
[node metadata](../map/storage.html#metadata).
|
||||
|
||||
```lua
|
||||
-- In a node def
|
||||
on_punch = function(pos, node)
|
||||
local inv = minetest.get_inventory({ type="node", pos=pos })
|
||||
-- now use the inventory
|
||||
@ -151,10 +150,9 @@ before accessing it:
|
||||
minetest.create_detached_inventory("inventory_name")
|
||||
```
|
||||
|
||||
The create_detached_inventory function accepts 3 arguments, where only the first - the inventory name -
|
||||
is required.
|
||||
The second argument takes a table of callbacks, which can be used to control how
|
||||
players interact with the inventory:
|
||||
The `create_detached_inventory` function accepts 3 arguments, where only the
|
||||
first - the inventory name - is required. The second argument takes a table of
|
||||
callbacks, which can be used to control how players interact with the inventory:
|
||||
|
||||
```lua
|
||||
-- Input only detached inventory
|
||||
|
Loading…
Reference in New Issue
Block a user