Node Metadata: Add Infotext explaination

This commit is contained in:
rubenwardy 2015-09-25 17:42:46 +01:00
parent fe972dacb2
commit aee95bc6f2

View File

@ -13,6 +13,7 @@ In this chapter you will learn how to manipulate a node's metadata.
* Reading Metadata
* Setting Metadata
* Lua Tables
* Infotext
* Your Turn
## What is Node Metadata?
@ -107,6 +108,16 @@ tmp.foo = "bar"
meta:from_table(tmp)
{% 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
* Make a block which disappears after it has been punched 5 times.