From a50ab100cdc44a5e0f092e218bcf348522d2f768 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Fri, 22 Jul 2016 19:37:58 +0100 Subject: [PATCH] Update lua_api.html --- lua_api.html | 294 +++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 215 insertions(+), 79 deletions(-) diff --git a/lua_api.html b/lua_api.html index 0cb47bf..3d6de96 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 26/May/2016.
See doc/lua_api.txt for the latest version (in plaintext).
Generated using a Python script.
+This page was last updated 22/July/2016.
See doc/lua_api.txt for the latest version (in plaintext).
Generated using a Python script.

Table of Contents

@@ -365,7 +366,7 @@ source code patches to celeron55@gmail.com< This page was last updated 26/May/2016.
See doc/lua_api.txt for the latest version (in plaintext).
Generated using a Python script.

Programming in Lua

+This page was last updated 22/July/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

@@ -416,12 +417,16 @@ the init.lua scripts in a shared environment.

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. -This settingtypes.txt will be parsed by the menu and the settings will be displayed in the "Games" category in the settings tab.

+This settingtypes.txt will be parsed by the menu and the settings will be displayed +in the "Games" category in the settings tab.

-

Games can provide custom main menu images. They are put inside a menu directory inside the game directory.

-

The images are named $identifier.png, where $identifier is one of overlay,background,footer,header. -If you want to specify multiple images for one identifier, add additional images named like $identifier.$n.png, with an ascending number $n starting with 1, -and a random image will be chosen from the provided ones.

+

Games can provide custom main menu images. They are put inside a menu directory +inside the game directory.

+

The images are named $identifier.png, where $identifier is +one of overlay,background,footer,header. +If you want to specify multiple images for one identifier, add additional images named +like $identifier.$n.png, with an ascending number $n starting with 1, and a random +image will be chosen from the provided ones.

Mod load path

Generic:

  • # @@ -1579,15 +1585,15 @@ list[current_player;craftpreview;7,1;1,1;]

    listring[<inventory location>;<list name>]

    • Allows to create a ring of inventory lists
    • -
    • Shift-clicking on items in one element of the ring
    • -
    • will send them to the next inventory list inside the ring
    • -
    • The first occurrence of an element inside the ring will
    • -
    • determine the inventory where items will be sent to
    • +
    • Shift-clicking on items in one element of the ring + will send them to the next inventory list inside the ring
    • +
    • The first occurrence of an element inside the ring will + determine the inventory where items will be sent to

    listring[]

      -
    • #Shorthand for doing listring[<inventory location>;<list name>]
    • -
    • for the last two inventory lists added by list[...]
    • +
    • #Shorthand for doing listring[<inventory location>;<list name>] + for the last two inventory lists added by list[...]

    listcolors[<slot_bg_normal>;<slot_bg_hover>]

      @@ -1650,7 +1656,7 @@ list[current_player;craftpreview;7,1;1,1;]
    • Textual password style field; will be sent to server when a button is clicked
    • #x and y position the field relative to the top left of the menu
    • #w and h are the size of the field
    • -
    • #fields are a set height, but will be vertically centred on h
    • +
    • #Fields are a set height, but will be vertically centred on h
    • Position and size units are inventory slots
    • #name is the name of the field as returned in fields to on_receive_fields
    • #label, if not blank, will be text printed on the top left above the field
    • @@ -1660,7 +1666,7 @@ list[current_player;craftpreview;7,1;1,1;]
    • Textual field; will be sent to server when a button is clicked
    • #x and y position the field relative to the top left of the menu
    • #w and h are the size of the field
    • -
    • #fields are a set height, but will be vertically centred on h
    • +
    • #Fields are a set height, but will be vertically centred on h
    • Position and size units are inventory slots
    • #name is the name of the field as returned in fields to on_receive_fields
    • #label, if not blank, will be text printed on the top left above the field
    • @@ -1673,14 +1679,14 @@ list[current_player;craftpreview;7,1;1,1;]

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

      -
    • as above, but without position/size units
    • -
    • special field for creating simple forms, such as sign text input
    • -
    • #must be used without a size[] element
    • -
    • a "Proceed" button will be added automatically
    • +
    • As above, but without position/size units
    • +
    • Special field for creating simple forms, such as sign text input
    • +
    • #Must be used without a size[] element
    • +
    • A "Proceed" button will be added automatically

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

      -
    • same as fields above, but with multi-line input
    • +
    • Same as fields above, but with multi-line input

    label[<X>,<Y>;<label>]

      @@ -1755,13 +1761,13 @@ list[current_player;craftpreview;7,1;1,1;]
    • if you want a listelement to start with "#" write "##"
  • -
  • index to be selected within textlist
  • +
  • Index to be selected within textlist
  • #true/false: draw transparent background
  • -
  • #see also minetest.explode_textlist_event (main menu: engine.explode_textlist_event)
  • +
  • #See also minetest.explode_textlist_event (main menu: engine.explode_textlist_event)
  • tabheader[<X>,<Y>;<name>;<caption 1>,<caption 2>,...,<caption n>;<current_tab>;<transparent>;<draw_border>]

    box[<X>,<Y>;<W>,<H>;<color>]

    -

    checkbox[<X>,<Y>;<name>;<label>;<selected>;<tooltip>]

    +

    checkbox[<X>,<Y>;<name>;<label>;<selected>]

    scrollbar[<X>,<Y>;<W>,<H>;<orientation>;<name>;<value>]

    table[<X>,<Y>;<W>,<H>;<name>;<cell 1>,<cell 2>,...,<cell n>;<selected idx>]

    tableoptions[<opt 1>;<opt 2>;...]

    tablecolumns[<type 1>,<opt 1a>,<opt 1b>,...;<type 2>,<opt 2a>,<opt 2b>;...]