Node Metadata: Add Infotext explaination
This commit is contained in:
parent
fe972dacb2
commit
aee95bc6f2
@ -13,6 +13,7 @@ In this chapter you will learn how to manipulate a node's metadata.
|
|||||||
* Reading Metadata
|
* Reading Metadata
|
||||||
* Setting Metadata
|
* Setting Metadata
|
||||||
* Lua Tables
|
* Lua Tables
|
||||||
|
* Infotext
|
||||||
* Your Turn
|
* Your Turn
|
||||||
|
|
||||||
## What is Node Metadata?
|
## What is Node Metadata?
|
||||||
@ -107,6 +108,16 @@ tmp.foo = "bar"
|
|||||||
meta:from_table(tmp)
|
meta:from_table(tmp)
|
||||||
{% endhighlight %}
|
{% endhighlight %}
|
||||||
|
|
||||||
|
## Infotext
|
||||||
|
|
||||||
|
The Minetest Engine reads the field `infotext` in order to make text
|
||||||
|
appear on mouse-over. This is used by furnaces to show progress and signs
|
||||||
|
to show their text.
|
||||||
|
|
||||||
|
{% highlight lua %}
|
||||||
|
meta:set_string("infotext", "Here is some text that will appear on mouse over!")
|
||||||
|
{% endhighlight %}
|
||||||
|
|
||||||
## Your Turn
|
## Your Turn
|
||||||
|
|
||||||
* Make a block which disappears after it has been punched 5 times.
|
* Make a block which disappears after it has been punched 5 times.
|
||||||
|
Loading…
Reference in New Issue
Block a user