summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorkwolekr <kwolekr@minetest.net>2014-02-09 12:38:50 -0500
committerkwolekr <kwolekr@minetest.net>2014-02-09 12:44:31 -0500
commit2a01050a0cf0826f25240e2cb407535394ee360f (patch)
treebb6d3fd3b27be094db7e885adc5ac25dc5e45139 /doc
parent57710520dca6bce175a6be48989e0a4689b1404e (diff)
downloadminetest-2a01050a0cf0826f25240e2cb407535394ee360f.tar.gz
minetest-2a01050a0cf0826f25240e2cb407535394ee360f.tar.bz2
minetest-2a01050a0cf0826f25240e2cb407535394ee360f.zip
Add capability to read table flag fields from Lua API
Diffstat (limited to 'doc')
-rw-r--r--doc/lua_api.txt22
1 files changed, 22 insertions, 0 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index aef17bec8..eb2820e27 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -410,6 +410,7 @@ All default ores are of the uniformly-distributed scatter type.
Ore attributes
-------------------
+See section Flag Specifier Format.
Currently supported flags: absheight
- absheight
Also produce this same ore between the height range of -height_max and -height_min.
@@ -451,6 +452,7 @@ Important note: Node aliases cannot be used for a raw schematic provided when re
Schematic attributes
---------------------
+See section Flag Specifier Format.
Currently supported flags: place_center_x, place_center_y, place_center_z
- place_center_x
Placement of this decoration is centered along the X axis.
@@ -525,6 +527,26 @@ pointed_thing:
{type="node", under=pos, above=pos}
{type="object", ref=ObjectRef}
+Flag Specifier Format
+-----------------------
+Flags using the standardized flag specifier format can be specified in either of two ways, by string or table.
+The string format is a comma-delimited set of flag names; whitespace and unrecognized flag fields are ignored.
+Specifying a flag in the string sets the flag, and specifying a flag prefixed by the string "no" explicitly
+clears the flag from whatever the default may be.
+In addition to the standard string flag format, the schematic flags field can also be a table of flag names
+to boolean values representing whether or not the flag is set. Additionally, if a field with the flag name
+prefixed with "no" is present, mapped to a boolean of any value, the specified flag is unset.
+
+e.g. A flag field of value
+ {place_center_x = true, place_center_y=false, place_center_z=true}
+is equivalent to
+ {place_center_x = true, noplace_center_y=true, place_center_z=true}
+which is equivalent to
+ "place_center_x, noplace_center_y, place_center_z"
+or even
+ "place_center_x, place_center_z"
+since, by default, no schematic attributes are set.
+
Items
------
Node (register_node):