1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-09-15 18:57:08 +00:00

from_table: Fix crash for missing inventory or field

This commit is contained in:
SmallJoker 2017-01-02 15:17:28 +01:00 committed by sapier
parent 814ee971f7
commit 79d752ba4f
2 changed files with 29 additions and 20 deletions

View file

@ -2781,8 +2781,9 @@ Can be gotten via `minetest.get_meta(pos)`.
* `get_inventory()`: returns `InvRef`
* `to_table()`: returns `nil` or `{fields = {...}, inventory = {list1 = {}, ...}}`
* `from_table(nil or {})`
* to clear metadata, use from_table(nil)
* Any non-table value will clear the metadata
* See "Node Metadata"
* returns `true` on success
### `NodeTimerRef`
Node Timers: a high resolution persistent per-node timer.