diff --git a/lua_api.html b/lua_api.html index 2055e9c..0cb47bf 100644 --- a/lua_api.html +++ b/lua_api.html @@ -4,10 +4,11 @@ layout: default ---
Content and functionality can be added to Minetest 0.4 by using Lua scripting in run-time loaded mods.
@@ -361,7 +365,7 @@ source code patches to celeron55@gmail.com<If you have any difficulty in understanding this, please read Programming in Lua.
Example:
default_dirt.png^default_grass_side.png
-default_grass_side.png
is overlayed over default_dirt.png
.
default_grass_side.png
is overlayed over default_dirt.png
.
+The texture with the lower resolution will be automatically upscaled to the higher resolution texture.
Textures can be grouped together by enclosing them in (
and )
.
Example: cobble.png^(thing1.png^thing2.png)
Example:
[combine:16x32:0,0=default_cobble.png:0,16=default_wood.png
+[resize:<w>x<h>
Resizes the texture to the given dimensions.
+Example:
+default_sandstone.png^[resize:16x16
+
[brighten
Brightens the texture.
Example:
@@ -841,9 +851,9 @@ paramtype2 == "facedir" ^ The rotation of the node is stored in param2. Furnaces and chests are rotated this way. Can be made by using minetest.dir_to_facedir(). Values range 0 - 23 - facedir modulo 4 = axisdir + facedir / 4 = axis direction: 0 = y+ 1 = z+ 2 = z- 3 = x+ 4 = x- 5 = y- - facedir's two less significant bits are rotation around the axis + facedir modulo 4 = rotation around that axis paramtype2 == "leveled" paramtype2 == "degrotate" ^ The rotation of this node is stored in param2. Plants are rotated this way. @@ -1159,6 +1169,7 @@ in the experimental stages.number
: Number of items in the inventory to be displayed.item
: Position of item that is selected.direction
offset
: offset in pixels from position.waypoint
Displays distance to selected world position.
@@ -2154,7 +2165,8 @@ or string form, a ColorString (defined above):hp_change
: the amount of change. Negative when it is damage.modifier
: when true, the function should return the actual hp_change.
Note: modifiers only get a temporary hp_change that can be modified by later modifiers.
- modifiers can return true as a second argument to stop the execution of further functions.minetest.register_on_respawnplayer(func(ObjectRef))
minetest.register_privilege(name, definition)
minetest.register_authentication_handler(handler)
minetest.auth_reload
call the authetification handler.
minetest.spawn_tree (pos, {treedef})
minetest.transforming_liquid_add(pos)
Warning +L-system generation currently creates lighting bugs in the form of mapblock-sized shadows. +Often these bugs appear as subtle shadows in water.
treedef={
axiom, --string initial tree axiom