@@ -1010,22 +1010,24 @@ The function of `param2` is determined by `paramtype2` in node definition.
1010
1010
* Values range 0 - 179. The value stored in `param2` is multiplied by two to
1011
1011
get the actual rotation in degrees of the node.
1012
1012
* `paramtype2 = "meshoptions"`
1013
- * Only valid for "plantlike" drawtype. The value of `param2` becomes a
1014
- bitfield which can be used to change how the client draws plantlike nodes .
1015
- * Bits 0, 1 and 2 form a mesh selector .
1016
- Currently the following meshes are choosable :
1013
+ * Only valid for "plantlike" drawtype. `param2` encodes the shape and
1014
+ optional modifiers of the "plant". `param2` is a bitfield .
1015
+ * Bits 0 to 2 select the shape .
1016
+ Use only one of the values below :
1017
1017
* 0 = a "x" shaped plant (ordinary plant)
1018
1018
* 1 = a "+" shaped plant (just rotated 45 degrees)
1019
1019
* 2 = a "*" shaped plant with 3 faces instead of 2
1020
1020
* 3 = a "#" shaped plant with 4 faces instead of 2
1021
1021
* 4 = a "#" shaped plant with 4 faces that lean outwards
1022
1022
* 5-7 are unused and reserved for future meshes.
1023
- * Bits 3 through 7 are optional flags that can be combined and give these
1024
- effects:
1025
- * bit 3 (0x08) - Makes the plant slightly vary placement horizontally
1026
- * bit 4 (0x10) - Makes the plant mesh 1.4x larger
1027
- * bit 5 (0x20) - Moves each face randomly a small bit down (1/8 max)
1028
- * bits 6-7 are reserved for future use.
1023
+ * Bits 3 to 7 are used to enable any number of optional modifiers.
1024
+ Just add the corresponding value(s) below to `param2`:
1025
+ * 8 - Makes the plant slightly vary placement horizontally
1026
+ * 16 - Makes the plant mesh 1.4x larger
1027
+ * 32 - Moves each face randomly a small bit down (1/8 max)
1028
+ * values 64 and 128 (bits 6-7) are reserved for future use.
1029
+ * Example: `param2 = 0` selects a normal "x" shaped plant
1030
+ * Example: `param2 = 17` selects a "+" shaped plant, 1.4x larger (1+16)
1029
1031
* `paramtype2 = "color"`
1030
1032
* `param2` tells which color is picked from the palette.
1031
1033
The palette should have 256 pixels.
@@ -2332,8 +2334,8 @@ Elements
2332
2334
* `name` fieldname data is transferred to Lua
2333
2335
* `caption 1`...: name shown on top of tab
2334
2336
* `current_tab`: index of selected tab 1...
2335
- * `transparent` (optional): show transparent
2336
- * `draw_border` (optional): draw border
2337
+ * `transparent` (optional): if true, tabs are semi- transparent
2338
+ * `draw_border` (optional): if true, draw a thin line at tab base
2337
2339
2338
2340
### `tabheader[<X>,<Y>;<H>;<name>;<caption 1>,<caption 2>,...,<caption n>;<current_tab>;<transparent>;<draw_border>]`
2339
2341
@@ -7020,6 +7022,7 @@ Used by `minetest.register_node`.
7020
7022
-- node is deleted from the world or the drops are added. This is
7021
7023
-- generally the result of either the node being dug or an attached node
7022
7024
-- becoming detached.
7025
+ -- oldmeta is the NodeMetaRef of the oldnode before deletion.
7023
7026
-- drops is a table of ItemStacks, so any metadata to be preserved can
7024
7027
-- be added directly to one or more of the dropped items. See
7025
7028
-- "ItemStackMetaRef".
@@ -7044,10 +7047,14 @@ Used by `minetest.register_node`.
7044
7047
7045
7048
on_punch = function(pos, node, puncher, pointed_thing),
7046
7049
-- default: minetest.node_punch
7050
+ -- Called when puncher (an ObjectRef) punches the node at pos.
7047
7051
-- By default calls minetest.register_on_punchnode callbacks.
7048
7052
7049
7053
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing),
7050
7054
-- default: nil
7055
+ -- Called when clicker (an ObjectRef) "rightclicks"
7056
+ -- ("rightclick" here stands for the placement key) while pointing at
7057
+ -- the node at pos with 'node' being the node table.
7051
7058
-- itemstack will hold clicker's wielded item.
7052
7059
-- Shall return the leftover itemstack.
7053
7060
-- Note: pointed_thing can be nil, if a mod calls this function.
0 commit comments