From 5b916a14c0347a97e73a7db0512c00c496358704 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Sun, 4 Jan 2015 17:42:59 +0000 Subject: [PATCH] Add python script for updating lua_api.html --- lua_api.html | 161 +++++++++++++++++++++++++++------------------- update_lua_api.py | 45 +++++++++++++ 2 files changed, 140 insertions(+), 66 deletions(-) create mode 100644 update_lua_api.py diff --git a/lua_api.html b/lua_api.html index 7b9cdb7..1bf93f8 100644 --- a/lua_api.html +++ b/lua_api.html @@ -2,9 +2,7 @@ title: Lua Modding API Reference layout: default --- - -

Table of Contents

- +

Table of Contents

+

Introduction

Content and functionality can be added to Minetest 0.4 by using Lua scripting in run-time loaded mods.

@@ -319,10 +319,10 @@ files are automatically transferred to the client.

If you see a deficiency in the API, feel free to attempt to add the functionality in the engine and API. You can send such improvements as source code patches to celeron55@gmail.com.

-

This may not be the most up to date version. See lua_api.txt - More information at http://www.minetest.net/ - Developer Wiki: http://dev.minetest.net/

-

Programming in Lua

+

Programming in Lua

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

Startup

Mods are loaded during server startup from the mod load paths by running @@ -796,7 +796,7 @@ changed in the future.

set to level from param2.

Meshes

If drawtype mesh is used, tiles should hold model materials textures. -Only static meshes are implemented. +Only static meshes are implemented.
For supported model formats see Irrlicht engine documentation.

Noise Parameters

Noise Parameters, or commonly called "NoiseParams", define the properties of perlin noise.

@@ -861,18 +861,41 @@ distribution of ore.

The relative height of the sheet can be controlled by the same perlin noise as well, by specifying a non-zero scale parameter in noise_params.

IMPORTANT: The noise is not transformed by offset or scale when comparing against the noise -threshold, but scale is used to determine relative height. +threshold, but scale is used to determine relative height.
The height of the blob is randomly scattered, with a maximum height of clust_size.

clust_scarcity and clust_num_ores are ignored.

This is essentially an improved version of the so-called "stratus" ore seen in some unofficial mods.

-

claylike -- not yet implemented

-

Places ore if there are no more than clust_scarcity number of specified nodes within a Von Neumann -neighborhood of clust_size radius.

+

blob

+

Creates a deformed sphere of ore according to 3d perlin noise described by +noise_params. The maximum size of the blob is clust_size, and +clust_scarcity has the same meaning as with the scatter type.

+

`vein

+

Creates veins of ore varying in density by according to the intersection of two +instances of 3d perlin noise with diffferent seeds, both described by +noise_params. random_factor varies the influence random chance has on +placement of an ore inside the vein, which is 1 by default. Note that +modifying this parameter may require adjusting noise_threshhold. +The parameters clust_scarcity, clust_num_ores, and clust_size are ignored +by this ore type. This ore type is difficult to control since it is sensitive +to small changes. The following is a decent set of parameters to work from:

+
noise_params = {
+    offset  = 0,
+    scale   = 3,
+    spread  = {x=200, y=200, z=200},
+    seed    = 5390,
+    octaves = 4,
+    persist = 0.5,
+    flags = "eased",
+},
+noise_threshhold = 1.6
+
+

WARNING: Use this ore type very sparingly since it is ~200x more +computationally expensive than any other ore.

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.

+

Also produce this same ore between the height range of -y_max and -y_min.

Useful for having ore in sky realms without having to duplicate ore entries.

Decoration types

The varying types of decorations that can be placed.

@@ -1261,7 +1284,7 @@ return damage

Client predicts damage based on damage groups. Because of this, it is able to give an immediate response when an entity is damaged or dies; the response is pre-defined somehow (e.g. by defining a sprite animation) (not implemented; -TODO). +TODO).
Currently a smoke puff will appear when an entity dies.

The group immortal completely disables normal damage.

Entities can define a special armor group, which is punch_operable. This @@ -1733,7 +1756,10 @@ value must (always) be two hexadecimal digits.

Optional: Also returns 0 when the absolute value is within the tolerance (default: 0) -
  • string:split(separator)
  • -
  • minetest.register_on_mapgen_init(func(MapgenParams)) -
  • minetest.register_on_craft(func(itemstack, player, old_craft_grid, craft_inv))
  • -
  • minetest.get_voxel_manip()