diff --git a/_data/links_en.yml b/_data/links_en.yml index 56b6564..25668ff 100644 --- a/_data/links_en.yml +++ b/_data/links_en.yml @@ -25,6 +25,8 @@ num: 5 link: chapters/node_drawtypes.html +- hr: true + - title: Node Metadata num: 6 link: chapters/node_metadata.html diff --git a/lua_api.html b/lua_api.html index e25ce5e..66d6e30 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 28/November/2017.
See doc/lua_api.txt for the latest version (in plaintext).
Generated using a Python script.
+This page was last updated 13/January/2018.
See doc/lua_api.txt for the latest version (in plaintext).
Generated using a Python script.

Table of Contents

Introduction

-

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

+

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

A mod is a self-contained bunch of scripts, textures and other related -things that is loaded by and interfaces with Minetest.

+things, which is loaded by and interfaces with Minetest.

Mods are contained and ran solely on the server side. Definitions and media 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.

+functionality in the engine and API, and to document it here.

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

Programming in Lua

+This page was last updated 13/January/2018.
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

@@ -470,12 +471,19 @@ the init.lua scripts in a shared environment.

  • #$path_user/games/gameid/
  • where gameid is unique to each game.

    -

    The game directory contains the file game.conf, which contains these fields:

    +

    The game directory contains the file game.conf, which contains:

    name = <Human-readable full name of the game>
     

    e.g.

    name = Minetest
     
    +

    Optionally, game.conf can also contain:

    +
    disallowed_mapgens = <comma-separated mapgens>
    +
    +

    e.g.

    +
    disallowed_mapgens = v5,v6,flat
    +
    +

    These mapgens are removed from the list of mapgens for the game.

    The game directory can contain the file minetest.conf, which will be used to set default settings when running the particular game. It can also contain a settingtypes.txt in the same format as the one in builtin. @@ -549,13 +557,13 @@ empty, except for lines starting with #, which are comments.

    List of mods that have to be loaded before loading this mod.

    A single line contains a single modname.

    Optional dependencies can be defined by appending a question mark -to a single modname. Their meaning is that if the specified mod -is missing, that does not prevent this mod from being loaded.

    +to a single modname. This means that if the specified mod +is missing, it does not prevent this mod from being loaded.

    screenshot.png

    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.

    +

    A file containing a description to be shown in the Mods tab of the mainmenu.

    settingtypes.txt

    A file in the same format as the one in builtin. It will be parsed by the settings menu and the settings will be displayed in the "Mods" category.

    @@ -595,14 +603,13 @@ be used for overriding the registrations of some other mod.

    Aliases

    Aliases can be added by using minetest.register_alias(name, convert_to) or minetest.register_alias_force(name, convert_to).

    -

    This will make Minetest to convert things called name to things called -convert_to.

    +

    This converts anything called name to convert_to.

    The only difference between minetest.register_alias and minetest.register_alias_force is that if an item called name exists, minetest.register_alias will do nothing while minetest.register_alias_force will unregister it.

    This can be used for maintaining backwards compatibility.

    -

    This can be also used for setting quick access names for things, e.g. if +

    This can also set quick access names for things, e.g. if you have an item called epiclylongmodname:stuff, you could do

    minetest.register_alias("stuff", "epiclylongmodname:stuff")
     
    @@ -679,7 +686,7 @@ to generate textures on-the-fly.

    Example:

    default_dirt.png^default_grass_side.png
     
    -

    default_grass_side.png is overlayed over default_dirt.png. +

    default_grass_side.png is overlaid over default_dirt.png. The texture with the lower resolution will be automatically upscaled to the higher resolution texture.

    Texture grouping

    @@ -1324,6 +1331,17 @@ number of boxes. It allows defining stuff like stairs and slabs.

    connect_left = box OR {box1, box2, ...} connect_back = box OR {box1, box2, ...} connect_right = box OR {box1, box2, ...} + -- The following `disconnected_*` boxes are the opposites of the + -- `connect_*` ones above, i.e. when a node has no suitable neighbour + -- on the respective side, the corresponding disconnected box is drawn. + disconnected_top = box OR {box1, box2, ...} + disconnected_bottom = box OR {box1, box2, ...} + disconnected_front = box OR {box1, box2, ...} + disconnected_left = box OR {box1, box2, ...} + disconnected_back = box OR {box1, box2, ...} + disconnected_right = box OR {box1, box2, ...} + disconnected = box OR {box1, box2, ...} -- when there is *no* neighbour + disconnected_sides = box OR {box1, box2, ...} -- when there are *no* neighbours to the sides }

    A box is defined as:

    @@ -1417,7 +1435,7 @@ 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, +ore emanates 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.

    @@ -2474,28 +2492,71 @@ The following functions provide escape sequences:

    Spatial Vectors

    +

    For the following functions, v, v1, v2 are vectors, p1, p2 are positions: