From 8059ca0cedfca0f7a8a665eeeca3830675197f32 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Fri, 25 Sep 2015 00:24:04 +0100 Subject: [PATCH] Update lua_api.html --- lua_api.html | 73 ++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 53 insertions(+), 20 deletions(-) diff --git a/lua_api.html b/lua_api.html index 869f45a..f5e4d64 100644 --- a/lua_api.html +++ b/lua_api.html @@ -79,12 +79,15 @@ layout: default
  • Ore types
  • Ore attributes
  • Decoration types
  • -
  • NoteTimerRefThis page was last updated 03/September/2015.
    See doc/lua_api.txt for the latest version (in plaintext).
    Generated using a Python script.

    Programming in Lua

    +This page was last updated 25/September/2015.
    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

    @@ -942,20 +945,31 @@ that point is greater than the noise_threshold, giving the ability a non-equal distribution of ore.

    sheet

    Creates a sheet of ore in a blob shape according to the 2D perlin noise -described by noise_params. 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. -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.

    +described by noise_params and noise_threshold. This is essentially an +improved version of the so-called "stratus" ore seen in some unofficial mods.

    +

    This sheet consists of vertical columns of uniform randomly distributed height, +varying between the inclusive range column_height_min and column_height_max. +If column_height_min is not specified, this parameter defaults to 1. +If column_height_max is not specified, this parameter defaults to clust_size +for reverse compatibility. New code should prefer column_height_max.

    +

    The column_midpoint_factor parameter controls the position of the column at which +ore eminates from. If 1, columns grow upward. If 0, columns grow downward. If 0.5, +columns grow equally starting from each direction. column_midpoint_factor is a +decimal number ranging in value from 0 to 1. If this parameter is not specified, +the default is 0.5.

    +

    The ore parameters clust_scarcity and clust_num_ores are ignored for this ore type.

    +

    puff

    +

    Creates a sheet of ore in a cloud-like puff shape.

    +

    As with the sheet ore type, the size and shape of puffs are described by +noise_params and noise_threshold and are placed at random vertical positions +within the currently generated chunk.

    +

    The vertical top and bottom displacement of each puff are determined by the noise +parameters np_puff_top and np_puff_bottom, respectively.

    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

    +

    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 @@ -983,6 +997,15 @@ computationally expensive than any other ore.

    absheight

    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.

    +

    puff_cliffs

    +

    If set, puff ore generation will not taper down large differences in displacement +when approaching the edge of a puff. This flag has no effect for ore types other +than puff.

    +

    puff_additive_composition

    +

    By default, when noise described by np_puff_top or np_puff_bottom results in a +negative displacement, the sub-column at that point is not generated. With this +attribute set, puff ore generation will instead generate the absolute difference in +noise displacement values. This flag has no effect for ore types other than puff.

    Decoration types

    The varying types of decorations that can be placed.

    The default value is simple, and is currently the only type supported.

    @@ -1900,6 +1923,10 @@ or string form, a ColorString (defined above):
  • Same but in reverse. Returns nil if the string can't be parsed to a position.
  • +
  • minetest.string_to_area("(X1, Y1, Z1) (X2, Y2, Z2)"): returns two positions +
  • minetest.formspec_escape(string): returns a string @@ -2235,15 +2262,16 @@ and minetest.auth_reload call the authetification handler.

  • Returns nil for unloaded area
  • -
  • -

    minetest.get_node_light(pos, timeofday) returns a number between 0 and 15 or nil

    -
  • -

    NoteTimerRef

    +

    NodeTimerRef

    Node Timers: a high resolution persistent per-node timer. Can be gotten via minetest.get_node_timer(pos).

    Methods