diff --git a/lua_api.html b/lua_api.html index 2f30c81..fded574 100644 --- a/lua_api.html +++ b/lua_api.html @@ -4,7 +4,7 @@ layout: default ---

This is lua_api.txt nicely formated: I did not write this

-This page was last updated 22/July/2016.
See doc/lua_api.txt for the latest version (in plaintext).
Generated using a Python script.
+This page was last updated 29/August/2016.
See doc/lua_api.txt for the latest version (in plaintext).
Generated using a Python script.

Table of Contents

This page was last updated 29/August/2016.
See doc/lua_api.txt for the latest version (in plaintext).
Generated using a Python script.

Programming in Lua

If you have any difficulty in understanding this, please read Programming in Lua.

Startup

@@ -486,7 +487,8 @@ empty, except for lines starting with #, which are comments.

to a single modname. Their meaning is that if the specified mod is missing, that does not prevent this mod from being loaded.

screenshot.png

-

A screenshot shown in modmanager within mainmenu.

+

A screenshot shown in the mod manager within the main menu. It should +have an aspect ratio of 3:2 and a minimum size of 300×200 pixels.

description.txt

A File containing description to be shown within mainmenu.

settingtypes.txt

@@ -585,6 +587,15 @@ specified coordinates.

Example:

default_sandstone.png^[resize:16x16
 
+

[opacity:<r>

+
Makes the base image transparent according to the given ratio.
+r must be between 0 and 255.
+0 means totally transparent.
+255 means totally opaque.
+
+

Example:

+
default_sandstone.png^[opacity:127
+

[brighten

Brightens the texture.

Example:

@@ -862,6 +873,22 @@ paramtype2 == "degrotate" ^ The rotation of this node is stored in param2. Plants are rotated this way. Values range 0 - 179. The value stored in param2 is multiplied by two to get the actual rotation of the node. +paramtype2 == "meshoptions" +^ Only valid for "plantlike". The value of param2 becomes a bitfield which can + be used to change how the client draws plantlike nodes. Bits 0, 1 and 2 form + a mesh selector. Currently the following meshes are choosable: + 0 = a "x" shaped plant (ordinary plant) + 1 = a "+" shaped plant (just rotated 45 degrees) + 2 = a "*" shaped plant with 3 faces instead of 2 + 3 = a "#" shaped plant with 4 faces instead of 2 + 4 = a "#" shaped plant with 4 faces that lean outwards + 5-7 are unused and reserved for future meshes. + Bits 3 through 7 are optional flags that can be combined and give these + effects: + bit 3 (0x08) - Makes the plant slightly vary placement horizontally + bit 4 (0x10) - Makes the plant mesh 1.4x larger + bit 5 (0x20) - Moves each face randomly a small bit down (1/8 max) + bits 6-7 are reserved for future use. collision_box = { type = "fixed", fixed = { @@ -1648,19 +1675,25 @@ list[current_player;craftpreview;7,1;1,1;]
  • #If true the background is clipped to formspec size (x and y are used as offset values, w and h are ignored)
  • -

    pwdfield[<X>,<Y>;<W>,<H>;<name>;<label>]

    +

    pwdfield[<X>,<Y>;<W>,<H>;<name>;<label>;<close_on_enter>]

    -

    field[<X>,<Y>;<W>,<H>;<name>;<label>;<default>]

    +

    field[<X>,<Y>;<W>,<H>;<name>;<label>;<default>;<close_on_enter>]

    +
  • #close_on_enter (optional) is whether the form should accept and close when enter is + pressed in this field. Defaults to true.
  • -

    field[<name>;<label>;<default>]

    +

    field[<name>;<label>;<default>;<close_on_enter>]

    textarea[<X>,<Y>;<W>,<H>;<name>;<label>;<default>]