mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Add capability to read table flag fields from Lua API
This commit is contained in:
parent
57710520dc
commit
2a01050a0c
7 changed files with 83 additions and 3 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue