mirror of
https://github.com/minetest/minetest.git
synced 2025-03-27 12:42:33 +01:00
DOCS: replace Minetest -> Luanti, minetest.
-> core.
(#15292)
Co-authored-by: grorp <gregor.parzefall@posteo.de>
This commit is contained in:
10
README.md
10
README.md
@ -1,13 +1,13 @@
|
|||||||
Minetest
|
Luanti (formerly Minetest)
|
||||||
========
|
==========================
|
||||||
|
|
||||||

|

|
||||||
[](https://hosted.weblate.org/engage/minetest/?utm_source=widget)
|
[](https://hosted.weblate.org/engage/minetest/?utm_source=widget)
|
||||||
[](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html)
|
[](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html)
|
||||||
|
|
||||||
Minetest is a free open-source voxel game engine with easy modding and game creation.
|
Luanti is a free open-source voxel game engine with easy modding and game creation.
|
||||||
|
|
||||||
Copyright (C) 2010-2022 Perttu Ahola <celeron55@gmail.com>
|
Copyright (C) 2010-2024 Perttu Ahola <celeron55@gmail.com>
|
||||||
and contributors (see source file comments and the version control log)
|
and contributors (see source file comments and the version control log)
|
||||||
|
|
||||||
Table of Contents
|
Table of Contents
|
||||||
@ -106,7 +106,7 @@ Configuration file
|
|||||||
------------------
|
------------------
|
||||||
- Default location:
|
- Default location:
|
||||||
`user/minetest.conf`
|
`user/minetest.conf`
|
||||||
- This file is created by closing Minetest for the first time.
|
- This file is created by closing Luanti for the first time.
|
||||||
- A specific file can be specified on the command line:
|
- A specific file can be specified on the command line:
|
||||||
`--config <path-to-file>`
|
`--config <path-to-file>`
|
||||||
- A run-in-place build will look for the configuration file in
|
- A run-in-place build will look for the configuration file in
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
# Minetest Android build
|
# Luanti Android build
|
||||||
All Minetest builds, including the Android variant, are based on the same code.
|
All Luanti builds, including the Android variant, are based on the same code.
|
||||||
However, additional Java code is used for proper Android integration.
|
However, additional Java code is used for proper Android integration.
|
||||||
|
|
||||||
## Controls
|
## Controls
|
||||||
Compared to Minetest binaries for PC, the Android port has limited functionality
|
Compared to Luanti binaries for PC, the Android port has limited functionality
|
||||||
due to limited capabilities of common devices. What can be done is described below:
|
due to limited capabilities of common devices. What can be done is described below:
|
||||||
|
|
||||||
While you're playing the game normally (that is, no menu or inventory is
|
While you're playing the game normally (that is, no menu or inventory is
|
||||||
@ -35,7 +35,7 @@ When a menu or inventory is displayed:
|
|||||||
* Complicated control can be difficult or impossible on Android device
|
* Complicated control can be difficult or impossible on Android device
|
||||||
|
|
||||||
## File Path
|
## File Path
|
||||||
There are some settings especially useful for Android users. The Minetest-wide
|
There are some settings especially useful for Android users. The Luanti-wide
|
||||||
configuration file can usually be found at:
|
configuration file can usually be found at:
|
||||||
|
|
||||||
* Before 5.4.2:
|
* Before 5.4.2:
|
||||||
@ -58,7 +58,7 @@ Mobile device generally have less RAM than PC, this setting limit how many mapbl
|
|||||||
this setting limit max FPS (Frame per second). Default value is 60, which lowest Android device screen refresh rate commonly found, but if you're using an device have lower refresh rate, change this
|
this setting limit max FPS (Frame per second). Default value is 60, which lowest Android device screen refresh rate commonly found, but if you're using an device have lower refresh rate, change this
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
The minimal and recommended system requirements for Minetest are listed below.
|
The minimal and recommended system requirements for Luanti are listed below.
|
||||||
|
|
||||||
### CPU
|
### CPU
|
||||||
Supported architectures:
|
Supported architectures:
|
||||||
@ -67,7 +67,7 @@ Supported architectures:
|
|||||||
3. x86
|
3. x86
|
||||||
4. x86_64
|
4. x86_64
|
||||||
|
|
||||||
CPU architectures similar to ARM or x86 might run Minetest but are not tested.
|
CPU architectures similar to ARM or x86 might run Luanti but are not tested.
|
||||||
|
|
||||||
### Minimum
|
### Minimum
|
||||||
1. Graphics API: OpenGL ES 1.0
|
1. Graphics API: OpenGL ES 1.0
|
||||||
@ -89,9 +89,9 @@ some shader settings cannot be used on OpenGL ES.
|
|||||||
Changing the graphic driver setting to OpenGL will result in undesirable behavior.
|
Changing the graphic driver setting to OpenGL will result in undesirable behavior.
|
||||||
|
|
||||||
## Building Requirements
|
## Building Requirements
|
||||||
In order to build, your PC has to be set up to build Minetest in the usual
|
In order to build, your PC has to be set up to build Luanti in the usual
|
||||||
manner (see the regular Minetest documentation for how to get this done).
|
manner (see the regular Luanti documentation for how to get this done).
|
||||||
In addition to what is required for Minetest in general, you will need the
|
In addition to what is required for Luanti in general, you will need the
|
||||||
following software packages. The version number in parenthesis denotes the
|
following software packages. The version number in parenthesis denotes the
|
||||||
version that was tested at the time this README was drafted; newer/older
|
version that was tested at the time this README was drafted; newer/older
|
||||||
versions may or may not work.
|
versions may or may not work.
|
||||||
@ -104,7 +104,7 @@ Additionally, you'll need to have an Internet connection available on the
|
|||||||
build system, as the Android build will download some source packages.
|
build system, as the Android build will download some source packages.
|
||||||
|
|
||||||
## Build
|
## Build
|
||||||
The new build system Minetest Android is fully functional and is designed to
|
The new build system Luanti Android is fully functional and is designed to
|
||||||
speed up and simplify the work, as well as adding the possibility of
|
speed up and simplify the work, as well as adding the possibility of
|
||||||
cross-platform build.
|
cross-platform build.
|
||||||
You can use `./gradlew assemblerelease` or `./gradlew assembledebug` from the
|
You can use `./gradlew assemblerelease` or `./gradlew assembledebug` from the
|
||||||
@ -120,7 +120,7 @@ automatically. Or you can create a `local.properties` file and specify
|
|||||||
- choose one yourself.
|
- choose one yourself.
|
||||||
|
|
||||||
* Once your keystore is setup, enter the android subdirectory and create a new
|
* Once your keystore is setup, enter the android subdirectory and create a new
|
||||||
file "ant.properties" there. Add following lines to that file:
|
file "ant.properties" there. Add the following lines to that file:
|
||||||
|
|
||||||
> key.store=<path to your keystore>
|
> key.store=<path to your keystore>
|
||||||
> key.alias=Minetest
|
> key.alias=Minetest
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Minetest Major Breakages List
|
# Luanti Major Breakages List
|
||||||
|
|
||||||
This document contains a list of breaking changes to be made in the next major version.
|
This document contains a list of breaking changes to be made in the next major version.
|
||||||
This list is largely advisory and items may be reevaluated once the time comes.
|
This list is largely advisory and items may be reevaluated once the time comes.
|
||||||
@ -8,7 +8,7 @@ This list is largely advisory and items may be reevaluated once the time comes.
|
|||||||
* remove player gravity multiplier (*2)
|
* remove player gravity multiplier (*2)
|
||||||
* `get_sky()` returns a table (without arg)
|
* `get_sky()` returns a table (without arg)
|
||||||
* `game.conf` name/id mess
|
* `game.conf` name/id mess
|
||||||
* remove `depends.txt` / `description.txt` (would simplify ContentDB and Minetest code a little)
|
* remove `depends.txt` / `description.txt` (would simplify ContentDB and Luanti code a little)
|
||||||
* rotate moon texture by 180°, making it coherent with the sun
|
* rotate moon texture by 180°, making it coherent with the sun
|
||||||
* https://github.com/minetest/minetest/pull/11902
|
* https://github.com/minetest/minetest/pull/11902
|
||||||
* remove undocumented `set_physics_override(num, num, num)`
|
* remove undocumented `set_physics_override(num, num, num)`
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
# Builtin Entities
|
# Builtin Entities
|
||||||
Minetest registers two entities by default: Falling nodes and dropped items.
|
Luanti registers two entities by default: Falling nodes and dropped items.
|
||||||
This document describes how they behave and what you can do with them.
|
This document describes how they behave and what you can do with them.
|
||||||
|
|
||||||
## Falling node (`__builtin:falling_node`)
|
## Falling node (`__builtin:falling_node`)
|
||||||
|
|
||||||
This entity is created by `minetest.check_for_falling` in place of a node
|
This entity is created by `core.check_for_falling` in place of a node
|
||||||
with the special group `falling_node=1`. Falling nodes can also be created
|
with the special group `falling_node=1`. Falling nodes can also be created
|
||||||
artificially with `minetest.spawn_falling_node`.
|
artificially with `core.spawn_falling_node`.
|
||||||
|
|
||||||
Needs manual initialization when spawned using `/spawnentity`.
|
Needs manual initialization when spawned using `/spawnentity`.
|
||||||
|
|
||||||
@ -81,7 +81,7 @@ Common cases that spawn a dropped item:
|
|||||||
|
|
||||||
* Item dropped by player
|
* Item dropped by player
|
||||||
* The root node of a node with the group `attached_node=1` is removed
|
* The root node of a node with the group `attached_node=1` is removed
|
||||||
* `minetest.add_item` is called
|
* `core.add_item` is called
|
||||||
|
|
||||||
Needs manual initialization when spawned using `/spawnentity`.
|
Needs manual initialization when spawned using `/spawnentity`.
|
||||||
|
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
Minetest Lua Client Modding API Reference 5.10.0
|
Luanti Lua Client Modding API Reference 5.10.0
|
||||||
================================================
|
==============================================
|
||||||
|
|
||||||
|
**WARNING**: if you're looking for the `minetest` namespace (e.g. `minetest.something`),
|
||||||
|
it's now called `core` due to the renaming of Luanti (formerly Minetest).
|
||||||
|
`minetest` will keep existing as an alias, so that old code won't break.
|
||||||
|
|
||||||
* More information at <http://www.minetest.net/>
|
* More information at <http://www.minetest.net/>
|
||||||
* Developer Wiki: <http://dev.minetest.net/>
|
* Developer Wiki: <http://dev.minetest.net/>
|
||||||
|
|
||||||
@ -8,11 +13,11 @@ Introduction
|
|||||||
|
|
||||||
** WARNING: The client API is currently unstable, and may break/change without warning. **
|
** WARNING: The client API is currently unstable, and may break/change without warning. **
|
||||||
|
|
||||||
Content and functionality can be added to Minetest by using Lua
|
Content and functionality can be added to Luanti by using Lua
|
||||||
scripting in run-time loaded mods.
|
scripting in run-time loaded mods.
|
||||||
|
|
||||||
A mod is a self-contained bunch of scripts, textures and other related
|
A mod is a self-contained bunch of scripts, textures and other related
|
||||||
things that is loaded by and interfaces with Minetest.
|
things that is loaded by and interfaces with Luanti.
|
||||||
|
|
||||||
Transferring client-sided mods from the server to the client is planned, but not implemented yet.
|
Transferring client-sided mods from the server to the client is planned, but not implemented yet.
|
||||||
|
|
||||||
@ -97,7 +102,7 @@ The location of this directory.
|
|||||||
|
|
||||||
An (optional) settings file that provides meta information about the mod.
|
An (optional) settings file that provides meta information about the mod.
|
||||||
|
|
||||||
* `name`: The mod name. Allows Minetest to determine the mod name even if the
|
* `name`: The mod name. Allows Luanti to determine the mod name even if the
|
||||||
folder is wrongly named.
|
folder is wrongly named.
|
||||||
* `description`: Description of mod to be shown in the Mods tab of the main
|
* `description`: Description of mod to be shown in the Mods tab of the main
|
||||||
menu.
|
menu.
|
||||||
@ -109,7 +114,7 @@ An (optional) settings file that provides meta information about the mod.
|
|||||||
### `init.lua`
|
### `init.lua`
|
||||||
|
|
||||||
The main Lua script. Running this script should register everything it
|
The main Lua script. Running this script should register everything it
|
||||||
wants to register. Subsequent execution depends on minetest calling the
|
wants to register. Subsequent execution depends on Luanti calling the
|
||||||
registered callbacks.
|
registered callbacks.
|
||||||
|
|
||||||
**NOTE**: Client mods currently can't provide textures, sounds, or models by
|
**NOTE**: Client mods currently can't provide textures, sounds, or models by
|
||||||
@ -247,39 +252,39 @@ Helper functions
|
|||||||
* e.g. `string:split("a,b", ",") == {"a","b"}`
|
* e.g. `string:split("a,b", ",") == {"a","b"}`
|
||||||
* `string:trim()`
|
* `string:trim()`
|
||||||
* e.g. `string.trim("\n \t\tfoo bar\t ") == "foo bar"`
|
* e.g. `string.trim("\n \t\tfoo bar\t ") == "foo bar"`
|
||||||
* `minetest.wrap_text(str, limit)`: returns a string
|
* `core.wrap_text(str, limit)`: returns a string
|
||||||
* Adds new lines to the string to keep it within the specified character limit
|
* Adds new lines to the string to keep it within the specified character limit
|
||||||
* limit: Maximal amount of characters in one line
|
* limit: Maximal amount of characters in one line
|
||||||
* `minetest.pos_to_string({x=X,y=Y,z=Z}, decimal_places))`: returns string `"(X,Y,Z)"`
|
* `core.pos_to_string({x=X,y=Y,z=Z}, decimal_places))`: returns string `"(X,Y,Z)"`
|
||||||
* Convert position to a printable string
|
* Convert position to a printable string
|
||||||
Optional: 'decimal_places' will round the x, y and z of the pos to the given decimal place.
|
Optional: 'decimal_places' will round the x, y and z of the pos to the given decimal place.
|
||||||
* `minetest.string_to_pos(string)`: returns a position
|
* `core.string_to_pos(string)`: returns a position
|
||||||
* Same but in reverse. Returns `nil` if the string can't be parsed to a position.
|
* 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
|
* `core.string_to_area("(X1, Y1, Z1) (X2, Y2, Z2)")`: returns two positions
|
||||||
* Converts a string representing an area box into two positions
|
* Converts a string representing an area box into two positions
|
||||||
* `minetest.is_yes(arg)`
|
* `core.is_yes(arg)`
|
||||||
* returns whether `arg` can be interpreted as yes
|
* returns whether `arg` can be interpreted as yes
|
||||||
* `minetest.is_nan(arg)`
|
* `core.is_nan(arg)`
|
||||||
* returns true when the passed number represents NaN.
|
* returns true when the passed number represents NaN.
|
||||||
* `table.copy(table)`: returns a table
|
* `table.copy(table)`: returns a table
|
||||||
* returns a deep copy of `table`
|
* returns a deep copy of `table`
|
||||||
|
|
||||||
Minetest namespace reference
|
'core' namespace reference
|
||||||
------------------------------
|
--------------------------
|
||||||
|
|
||||||
### Utilities
|
### Utilities
|
||||||
|
|
||||||
* `minetest.get_current_modname()`: returns the currently loading mod's name, when we are loading a mod
|
* `core.get_current_modname()`: returns the currently loading mod's name, when we are loading a mod
|
||||||
* `minetest.get_modpath(modname)`: returns virtual path of given mod including
|
* `core.get_modpath(modname)`: returns virtual path of given mod including
|
||||||
the trailing separator. This is useful to load additional Lua files
|
the trailing separator. This is useful to load additional Lua files
|
||||||
contained in your mod:
|
contained in your mod:
|
||||||
e.g. `dofile(minetest.get_modpath(minetest.get_current_modname()) .. "stuff.lua")`
|
e.g. `dofile(core.get_modpath(core.get_current_modname()) .. "stuff.lua")`
|
||||||
* `minetest.get_language()`: returns two strings
|
* `core.get_language()`: returns two strings
|
||||||
* the current gettext locale
|
* the current gettext locale
|
||||||
* the current language code (the same as used for client-side translations)
|
* the current language code (the same as used for client-side translations)
|
||||||
* `minetest.get_version()`: returns a table containing components of the
|
* `core.get_version()`: returns a table containing components of the
|
||||||
engine version. Components:
|
engine version. Components:
|
||||||
* `project`: Name of the project, eg, "Minetest"
|
* `project`: Name of the project, eg, "Luanti"
|
||||||
* `string`: Simple version, eg, "1.2.3-dev"
|
* `string`: Simple version, eg, "1.2.3-dev"
|
||||||
* `hash`: Full git version (only set if available), eg, "1.2.3-dev-01234567-dirty"
|
* `hash`: Full git version (only set if available), eg, "1.2.3-dev-01234567-dirty"
|
||||||
Use this for informational purposes only. The information in the returned
|
Use this for informational purposes only. The information in the returned
|
||||||
@ -287,85 +292,85 @@ Minetest namespace reference
|
|||||||
reliable or verifiable. Compatible forks will have a different name and
|
reliable or verifiable. Compatible forks will have a different name and
|
||||||
version entirely. To check for the presence of engine features, test
|
version entirely. To check for the presence of engine features, test
|
||||||
whether the functions exported by the wanted features exist. For example:
|
whether the functions exported by the wanted features exist. For example:
|
||||||
`if minetest.check_for_falling then ... end`.
|
`if core.check_for_falling then ... end`.
|
||||||
* `minetest.sha1(data, [raw])`: returns the sha1 hash of data
|
* `core.sha1(data, [raw])`: returns the sha1 hash of data
|
||||||
* `data`: string of data to hash
|
* `data`: string of data to hash
|
||||||
* `raw`: return raw bytes instead of hex digits, default: false
|
* `raw`: return raw bytes instead of hex digits, default: false
|
||||||
* `minetest.colorspec_to_colorstring(colorspec)`: Converts a ColorSpec to a
|
* `core.colorspec_to_colorstring(colorspec)`: Converts a ColorSpec to a
|
||||||
ColorString. If the ColorSpec is invalid, returns `nil`.
|
ColorString. If the ColorSpec is invalid, returns `nil`.
|
||||||
* `colorspec`: The ColorSpec to convert
|
* `colorspec`: The ColorSpec to convert
|
||||||
* `minetest.get_csm_restrictions()`: returns a table of `Flags` indicating the
|
* `core.get_csm_restrictions()`: returns a table of `Flags` indicating the
|
||||||
restrictions applied to the current mod.
|
restrictions applied to the current mod.
|
||||||
* If a flag in this table is set to true, the feature is RESTRICTED.
|
* If a flag in this table is set to true, the feature is RESTRICTED.
|
||||||
* Possible flags: `load_client_mods`, `chat_messages`, `read_itemdefs`,
|
* Possible flags: `load_client_mods`, `chat_messages`, `read_itemdefs`,
|
||||||
`read_nodedefs`, `lookup_nodes`, `read_playerinfo`
|
`read_nodedefs`, `lookup_nodes`, `read_playerinfo`
|
||||||
* `minetest.urlencode(str)`: Encodes non-unreserved URI characters by a
|
* `core.urlencode(str)`: Encodes non-unreserved URI characters by a
|
||||||
percent sign followed by two hex digits. See
|
percent sign followed by two hex digits. See
|
||||||
[RFC 3986, section 2.3](https://datatracker.ietf.org/doc/html/rfc3986#section-2.3).
|
[RFC 3986, section 2.3](https://datatracker.ietf.org/doc/html/rfc3986#section-2.3).
|
||||||
|
|
||||||
### Logging
|
### Logging
|
||||||
* `minetest.debug(...)`
|
* `core.debug(...)`
|
||||||
* Equivalent to `minetest.log(table.concat({...}, "\t"))`
|
* Equivalent to `core.log(table.concat({...}, "\t"))`
|
||||||
* `minetest.log([level,] text)`
|
* `core.log([level,] text)`
|
||||||
* `level` is one of `"none"`, `"error"`, `"warning"`, `"action"`,
|
* `level` is one of `"none"`, `"error"`, `"warning"`, `"action"`,
|
||||||
`"info"`, or `"verbose"`. Default is `"none"`.
|
`"info"`, or `"verbose"`. Default is `"none"`.
|
||||||
|
|
||||||
### Global callback registration functions
|
### Global callback registration functions
|
||||||
Call these functions only at load time!
|
Call these functions only at load time!
|
||||||
|
|
||||||
* `minetest.register_globalstep(function(dtime))`
|
* `core.register_globalstep(function(dtime))`
|
||||||
* Called every client environment step
|
* Called every client environment step
|
||||||
* `dtime` is the time since last execution in seconds.
|
* `dtime` is the time since last execution in seconds.
|
||||||
* `minetest.register_on_mods_loaded(function())`
|
* `core.register_on_mods_loaded(function())`
|
||||||
* Called just after mods have finished loading.
|
* Called just after mods have finished loading.
|
||||||
* `minetest.register_on_shutdown(function())`
|
* `core.register_on_shutdown(function())`
|
||||||
* Called before client shutdown
|
* Called before client shutdown
|
||||||
* **Warning**: If the client terminates abnormally (i.e. crashes), the registered
|
* **Warning**: If the client terminates abnormally (i.e. crashes), the registered
|
||||||
callbacks **will likely not be run**. Data should be saved at
|
callbacks **will likely not be run**. Data should be saved at
|
||||||
semi-frequent intervals as well as on server shutdown.
|
semi-frequent intervals as well as on server shutdown.
|
||||||
* `minetest.register_on_receiving_chat_message(function(message))`
|
* `core.register_on_receiving_chat_message(function(message))`
|
||||||
* Called always when a client receive a message
|
* Called always when a client receive a message
|
||||||
* Return `true` to mark the message as handled, which means that it will not be shown to chat
|
* Return `true` to mark the message as handled, which means that it will not be shown to chat
|
||||||
* `minetest.register_on_sending_chat_message(function(message))`
|
* `core.register_on_sending_chat_message(function(message))`
|
||||||
* Called always when a client sends a message from chat
|
* Called always when a client sends a message from chat
|
||||||
* Return `true` to mark the message as handled, which means that it will not be sent to server
|
* Return `true` to mark the message as handled, which means that it will not be sent to server
|
||||||
* `minetest.register_chatcommand(cmd, chatcommand definition)`
|
* `core.register_chatcommand(cmd, chatcommand definition)`
|
||||||
* Adds definition to minetest.registered_chatcommands
|
* Adds definition to core.registered_chatcommands
|
||||||
* `minetest.unregister_chatcommand(name)`
|
* `core.unregister_chatcommand(name)`
|
||||||
* Unregisters a chatcommands registered with register_chatcommand.
|
* Unregisters a chatcommands registered with register_chatcommand.
|
||||||
* `minetest.register_on_chatcommand(function(command, params))`
|
* `core.register_on_chatcommand(function(command, params))`
|
||||||
* Called always when a chatcommand is triggered, before `minetest.registered_chatcommands`
|
* Called always when a chatcommand is triggered, before `core.registered_chatcommands`
|
||||||
is checked to see if the command exists, but after the input is parsed.
|
is checked to see if the command exists, but after the input is parsed.
|
||||||
* Return `true` to mark the command as handled, which means that the default
|
* Return `true` to mark the command as handled, which means that the default
|
||||||
handlers will be prevented.
|
handlers will be prevented.
|
||||||
* `minetest.register_on_hp_modification(function(hp))`
|
* `core.register_on_hp_modification(function(hp))`
|
||||||
* Called when server modified player's HP
|
* Called when server modified player's HP
|
||||||
* `minetest.register_on_damage_taken(function(hp))`
|
* `core.register_on_damage_taken(function(hp))`
|
||||||
* Called when the local player take damages
|
* Called when the local player take damages
|
||||||
* `minetest.register_on_formspec_input(function(formname, fields))`
|
* `core.register_on_formspec_input(function(formname, fields))`
|
||||||
* Called when a button is pressed in the local player's inventory form
|
* Called when a button is pressed in the local player's inventory form
|
||||||
* Newest functions are called first
|
* Newest functions are called first
|
||||||
* If function returns `true`, remaining functions are not called
|
* If function returns `true`, remaining functions are not called
|
||||||
* `minetest.register_on_dignode(function(pos, node))`
|
* `core.register_on_dignode(function(pos, node))`
|
||||||
* Called when the local player digs a node
|
* Called when the local player digs a node
|
||||||
* Newest functions are called first
|
* Newest functions are called first
|
||||||
* If any function returns true, the node isn't dug
|
* If any function returns true, the node isn't dug
|
||||||
* `minetest.register_on_punchnode(function(pos, node))`
|
* `core.register_on_punchnode(function(pos, node))`
|
||||||
* Called when the local player punches a node
|
* Called when the local player punches a node
|
||||||
* Newest functions are called first
|
* Newest functions are called first
|
||||||
* If any function returns true, the punch is ignored
|
* If any function returns true, the punch is ignored
|
||||||
* `minetest.register_on_placenode(function(pointed_thing, node))`
|
* `core.register_on_placenode(function(pointed_thing, node))`
|
||||||
* Called when a node has been placed
|
* Called when a node has been placed
|
||||||
* `minetest.register_on_item_use(function(item, pointed_thing))`
|
* `core.register_on_item_use(function(item, pointed_thing))`
|
||||||
* Called when the local player uses an item.
|
* Called when the local player uses an item.
|
||||||
* Newest functions are called first.
|
* Newest functions are called first.
|
||||||
* If any function returns true, the item use is not sent to server.
|
* If any function returns true, the item use is not sent to server.
|
||||||
* `minetest.register_on_modchannel_message(function(channel_name, sender, message))`
|
* `core.register_on_modchannel_message(function(channel_name, sender, message))`
|
||||||
* Called when an incoming mod channel message is received
|
* Called when an incoming mod channel message is received
|
||||||
* You must have joined some channels before, and server must acknowledge the
|
* You must have joined some channels before, and server must acknowledge the
|
||||||
join request.
|
join request.
|
||||||
* If message comes from a server mod, `sender` field is an empty string.
|
* If message comes from a server mod, `sender` field is an empty string.
|
||||||
* `minetest.register_on_modchannel_signal(function(channel_name, signal))`
|
* `core.register_on_modchannel_signal(function(channel_name, signal))`
|
||||||
* Called when a valid incoming mod channel signal is received
|
* Called when a valid incoming mod channel signal is received
|
||||||
* Signal id permit to react to server mod channel events
|
* Signal id permit to react to server mod channel events
|
||||||
* Possible values are:
|
* Possible values are:
|
||||||
@ -375,54 +380,54 @@ Call these functions only at load time!
|
|||||||
3: leave_failed
|
3: leave_failed
|
||||||
4: event_on_not_joined_channel
|
4: event_on_not_joined_channel
|
||||||
5: state_changed
|
5: state_changed
|
||||||
* `minetest.register_on_inventory_open(function(inventory))`
|
* `core.register_on_inventory_open(function(inventory))`
|
||||||
* Called when the local player open inventory
|
* Called when the local player open inventory
|
||||||
* Newest functions are called first
|
* Newest functions are called first
|
||||||
* If any function returns true, inventory doesn't open
|
* If any function returns true, inventory doesn't open
|
||||||
### Sounds
|
### Sounds
|
||||||
* `minetest.sound_play(spec, parameters)`: returns a handle
|
* `core.sound_play(spec, parameters)`: returns a handle
|
||||||
* `spec` is a `SimpleSoundSpec`
|
* `spec` is a `SimpleSoundSpec`
|
||||||
* `parameters` is a sound parameter table
|
* `parameters` is a sound parameter table
|
||||||
* `handle:stop()` or `minetest.sound_stop(handle)`
|
* `handle:stop()` or `core.sound_stop(handle)`
|
||||||
* `handle` is a handle returned by `minetest.sound_play`
|
* `handle` is a handle returned by `core.sound_play`
|
||||||
* `handle:fade(step, gain)` or `minetest.sound_fade(handle, step, gain)`
|
* `handle:fade(step, gain)` or `core.sound_fade(handle, step, gain)`
|
||||||
* `handle` is a handle returned by `minetest.sound_play`
|
* `handle` is a handle returned by `core.sound_play`
|
||||||
* `step` determines how fast a sound will fade.
|
* `step` determines how fast a sound will fade.
|
||||||
Negative step will lower the sound volume, positive step will increase
|
Negative step will lower the sound volume, positive step will increase
|
||||||
the sound volume.
|
the sound volume.
|
||||||
* `gain` the target gain for the fade.
|
* `gain` the target gain for the fade.
|
||||||
|
|
||||||
### Timing
|
### Timing
|
||||||
* `minetest.after(time, func, ...)`
|
* `core.after(time, func, ...)`
|
||||||
* Call the function `func` after `time` seconds, may be fractional
|
* Call the function `func` after `time` seconds, may be fractional
|
||||||
* Optional: Variable number of arguments that are passed to `func`
|
* Optional: Variable number of arguments that are passed to `func`
|
||||||
* Jobs set for earlier times are executed earlier. If multiple jobs expire
|
* Jobs set for earlier times are executed earlier. If multiple jobs expire
|
||||||
at exactly the same time, then they expire in the order in which they were
|
at exactly the same time, then they expire in the order in which they were
|
||||||
registered. This basically just applies to jobs registered on the same
|
registered. This basically just applies to jobs registered on the same
|
||||||
step with the exact same delay.
|
step with the exact same delay.
|
||||||
* `minetest.get_us_time()`
|
* `core.get_us_time()`
|
||||||
* Returns time with microsecond precision. May not return wall time.
|
* Returns time with microsecond precision. May not return wall time.
|
||||||
* `minetest.get_timeofday()`
|
* `core.get_timeofday()`
|
||||||
* Returns the time of day: `0` for midnight, `0.5` for midday
|
* Returns the time of day: `0` for midnight, `0.5` for midday
|
||||||
|
|
||||||
### Map
|
### Map
|
||||||
* `minetest.get_node_or_nil(pos)`
|
* `core.get_node_or_nil(pos)`
|
||||||
* Returns the node at the given position as table in the format
|
* Returns the node at the given position as table in the format
|
||||||
`{name="node_name", param1=0, param2=0}`, returns `nil`
|
`{name="node_name", param1=0, param2=0}`, returns `nil`
|
||||||
for unloaded areas or flavor limited areas.
|
for unloaded areas or flavor limited areas.
|
||||||
* `minetest.get_node_light(pos, timeofday)`
|
* `core.get_node_light(pos, timeofday)`
|
||||||
* Gets the light value at the given position. Note that the light value
|
* Gets the light value at the given position. Note that the light value
|
||||||
"inside" the node at the given position is returned, so you usually want
|
"inside" the node at the given position is returned, so you usually want
|
||||||
to get the light value of a neighbor.
|
to get the light value of a neighbor.
|
||||||
* `pos`: The position where to measure the light.
|
* `pos`: The position where to measure the light.
|
||||||
* `timeofday`: `nil` for current time, `0` for night, `0.5` for day
|
* `timeofday`: `nil` for current time, `0` for night, `0.5` for day
|
||||||
* Returns a number between `0` and `15` or `nil`
|
* Returns a number between `0` and `15` or `nil`
|
||||||
* `minetest.find_node_near(pos, radius, nodenames, [search_center])`: returns pos or `nil`
|
* `core.find_node_near(pos, radius, nodenames, [search_center])`: returns pos or `nil`
|
||||||
* `radius`: using a maximum metric
|
* `radius`: using a maximum metric
|
||||||
* `nodenames`: e.g. `{"ignore", "group:tree"}` or `"default:dirt"`
|
* `nodenames`: e.g. `{"ignore", "group:tree"}` or `"default:dirt"`
|
||||||
* `search_center` is an optional boolean (default: `false`)
|
* `search_center` is an optional boolean (default: `false`)
|
||||||
If true `pos` is also checked for the nodes
|
If true `pos` is also checked for the nodes
|
||||||
* `minetest.find_nodes_in_area(pos1, pos2, nodenames, [grouped])`
|
* `core.find_nodes_in_area(pos1, pos2, nodenames, [grouped])`
|
||||||
* `pos1` and `pos2` are the min and max positions of the area to search.
|
* `pos1` and `pos2` are the min and max positions of the area to search.
|
||||||
* `nodenames`: e.g. `{"ignore", "group:tree"}` or `"default:dirt"`
|
* `nodenames`: e.g. `{"ignore", "group:tree"}` or `"default:dirt"`
|
||||||
* If `grouped` is true the return value is a table indexed by node name
|
* If `grouped` is true the return value is a table indexed by node name
|
||||||
@ -432,91 +437,91 @@ Call these functions only at load time!
|
|||||||
second value: Table with the count of each node with the node name
|
second value: Table with the count of each node with the node name
|
||||||
as index
|
as index
|
||||||
* Area volume is limited to 4,096,000 nodes
|
* Area volume is limited to 4,096,000 nodes
|
||||||
* `minetest.find_nodes_in_area_under_air(pos1, pos2, nodenames)`: returns a
|
* `core.find_nodes_in_area_under_air(pos1, pos2, nodenames)`: returns a
|
||||||
list of positions.
|
list of positions.
|
||||||
* `nodenames`: e.g. `{"ignore", "group:tree"}` or `"default:dirt"`
|
* `nodenames`: e.g. `{"ignore", "group:tree"}` or `"default:dirt"`
|
||||||
* Return value: Table with all node positions with a node air above
|
* Return value: Table with all node positions with a node air above
|
||||||
* Area volume is limited to 4,096,000 nodes
|
* Area volume is limited to 4,096,000 nodes
|
||||||
* `minetest.line_of_sight(pos1, pos2)`: returns `boolean, pos`
|
* `core.line_of_sight(pos1, pos2)`: returns `boolean, pos`
|
||||||
* Checks if there is anything other than air between pos1 and pos2.
|
* Checks if there is anything other than air between pos1 and pos2.
|
||||||
* Returns false if something is blocking the sight.
|
* Returns false if something is blocking the sight.
|
||||||
* Returns the position of the blocking node when `false`
|
* Returns the position of the blocking node when `false`
|
||||||
* `pos1`: First position
|
* `pos1`: First position
|
||||||
* `pos2`: Second position
|
* `pos2`: Second position
|
||||||
* `minetest.raycast(pos1, pos2, objects, liquids)`: returns `Raycast`
|
* `core.raycast(pos1, pos2, objects, liquids)`: returns `Raycast`
|
||||||
* Creates a `Raycast` object.
|
* Creates a `Raycast` object.
|
||||||
* `pos1`: start of the ray
|
* `pos1`: start of the ray
|
||||||
* `pos2`: end of the ray
|
* `pos2`: end of the ray
|
||||||
* `objects`: if false, only nodes will be returned. Default is `true`.
|
* `objects`: if false, only nodes will be returned. Default is `true`.
|
||||||
* `liquids`: if false, liquid nodes won't be returned. Default is `false`.
|
* `liquids`: if false, liquid nodes won't be returned. Default is `false`.
|
||||||
|
|
||||||
* `minetest.find_nodes_with_meta(pos1, pos2)`
|
* `core.find_nodes_with_meta(pos1, pos2)`
|
||||||
* Get a table of positions of nodes that have metadata within a region
|
* Get a table of positions of nodes that have metadata within a region
|
||||||
{pos1, pos2}.
|
{pos1, pos2}.
|
||||||
* `minetest.get_meta(pos)`
|
* `core.get_meta(pos)`
|
||||||
* Get a `NodeMetaRef` at that position
|
* Get a `NodeMetaRef` at that position
|
||||||
* `minetest.get_node_level(pos)`
|
* `core.get_node_level(pos)`
|
||||||
* get level of leveled node (water, snow)
|
* get level of leveled node (water, snow)
|
||||||
* `minetest.get_node_max_level(pos)`
|
* `core.get_node_max_level(pos)`
|
||||||
* get max available level for leveled node
|
* get max available level for leveled node
|
||||||
|
|
||||||
### Player
|
### Player
|
||||||
* `minetest.send_chat_message(message)`
|
* `core.send_chat_message(message)`
|
||||||
* Act as if `message` was typed by the player into the terminal.
|
* Act as if `message` was typed by the player into the terminal.
|
||||||
* `minetest.run_server_chatcommand(cmd, param)`
|
* `core.run_server_chatcommand(cmd, param)`
|
||||||
* Alias for `minetest.send_chat_message("/" .. cmd .. " " .. param)`
|
* Alias for `core.send_chat_message("/" .. cmd .. " " .. param)`
|
||||||
* `minetest.clear_out_chat_queue()`
|
* `core.clear_out_chat_queue()`
|
||||||
* Clears the out chat queue
|
* Clears the out chat queue
|
||||||
* `minetest.localplayer`
|
* `core.localplayer`
|
||||||
* Reference to the LocalPlayer object. See [`LocalPlayer`](#localplayer) class reference for methods.
|
* Reference to the LocalPlayer object. See [`LocalPlayer`](#localplayer) class reference for methods.
|
||||||
|
|
||||||
### Privileges
|
### Privileges
|
||||||
* `minetest.get_privilege_list()`
|
* `core.get_privilege_list()`
|
||||||
* Returns a list of privileges the current player has in the format `{priv1=true,...}`
|
* Returns a list of privileges the current player has in the format `{priv1=true,...}`
|
||||||
* `minetest.string_to_privs(str)`: returns `{priv1=true,...}`
|
* `core.string_to_privs(str)`: returns `{priv1=true,...}`
|
||||||
* `minetest.privs_to_string(privs)`: returns `"priv1,priv2,..."`
|
* `core.privs_to_string(privs)`: returns `"priv1,priv2,..."`
|
||||||
* Convert between two privilege representations
|
* Convert between two privilege representations
|
||||||
|
|
||||||
### Client Environment
|
### Client Environment
|
||||||
* `minetest.get_player_names()`
|
* `core.get_player_names()`
|
||||||
* Returns list of player names on server (nil if CSM_RF_READ_PLAYERINFO is enabled by server)
|
* Returns list of player names on server (nil if CSM_RF_READ_PLAYERINFO is enabled by server)
|
||||||
* `minetest.disconnect()`
|
* `core.disconnect()`
|
||||||
* Disconnect from the server and exit to main menu.
|
* Disconnect from the server and exit to main menu.
|
||||||
* Returns `false` if the client is already disconnecting otherwise returns `true`.
|
* Returns `false` if the client is already disconnecting otherwise returns `true`.
|
||||||
* `minetest.get_server_info()`
|
* `core.get_server_info()`
|
||||||
* Returns [server info](#server-info).
|
* Returns [server info](#server-info).
|
||||||
|
|
||||||
### Storage API
|
### Storage API
|
||||||
* `minetest.get_mod_storage()`:
|
* `core.get_mod_storage()`:
|
||||||
* returns reference to mod private `StorageRef`
|
* returns reference to mod private `StorageRef`
|
||||||
* must be called during mod load time
|
* must be called during mod load time
|
||||||
|
|
||||||
### Mod channels
|
### Mod channels
|
||||||

|

|
||||||
|
|
||||||
* `minetest.mod_channel_join(channel_name)`
|
* `core.mod_channel_join(channel_name)`
|
||||||
* Client joins channel `channel_name`, and creates it, if necessary. You
|
* Client joins channel `channel_name`, and creates it, if necessary. You
|
||||||
should listen from incoming messages with `minetest.register_on_modchannel_message`
|
should listen from incoming messages with `core.register_on_modchannel_message`
|
||||||
call to receive incoming messages. Warning, this function is asynchronous.
|
call to receive incoming messages. Warning, this function is asynchronous.
|
||||||
|
|
||||||
### Particles
|
### Particles
|
||||||
* `minetest.add_particle(particle definition)`
|
* `core.add_particle(particle definition)`
|
||||||
|
|
||||||
* `minetest.add_particlespawner(particlespawner definition)`
|
* `core.add_particlespawner(particlespawner definition)`
|
||||||
* Add a `ParticleSpawner`, an object that spawns an amount of particles over `time` seconds
|
* Add a `ParticleSpawner`, an object that spawns an amount of particles over `time` seconds
|
||||||
* Returns an `id`, and -1 if adding didn't succeed
|
* Returns an `id`, and -1 if adding didn't succeed
|
||||||
|
|
||||||
* `minetest.delete_particlespawner(id)`
|
* `core.delete_particlespawner(id)`
|
||||||
* Delete `ParticleSpawner` with `id` (return value from `minetest.add_particlespawner`)
|
* Delete `ParticleSpawner` with `id` (return value from `core.add_particlespawner`)
|
||||||
|
|
||||||
### Misc.
|
### Misc.
|
||||||
* `minetest.parse_json(string[, nullvalue])`: returns something
|
* `core.parse_json(string[, nullvalue])`: returns something
|
||||||
* Convert a string containing JSON data into the Lua equivalent
|
* Convert a string containing JSON data into the Lua equivalent
|
||||||
* `nullvalue`: returned in place of the JSON null; defaults to `nil`
|
* `nullvalue`: returned in place of the JSON null; defaults to `nil`
|
||||||
* On success returns a table, a string, a number, a boolean or `nullvalue`
|
* On success returns a table, a string, a number, a boolean or `nullvalue`
|
||||||
* On failure outputs an error message and returns `nil`
|
* On failure outputs an error message and returns `nil`
|
||||||
* Example: `parse_json("[10, {\"a\":false}]")`, returns `{10, {a = false}}`
|
* Example: `parse_json("[10, {\"a\":false}]")`, returns `{10, {a = false}}`
|
||||||
* `minetest.write_json(data[, styled])`: returns a string or `nil` and an error message
|
* `core.write_json(data[, styled])`: returns a string or `nil` and an error message
|
||||||
* Convert a Lua table into a JSON string
|
* Convert a Lua table into a JSON string
|
||||||
* styled: Outputs in a human-readable format if this is set, defaults to false
|
* styled: Outputs in a human-readable format if this is set, defaults to false
|
||||||
* Unserializable things like functions and userdata are saved as null.
|
* Unserializable things like functions and userdata are saved as null.
|
||||||
@ -525,18 +530,18 @@ Call these functions only at load time!
|
|||||||
2. You cannot mix string and integer keys.
|
2. You cannot mix string and integer keys.
|
||||||
This is due to the fact that JSON has two distinct array and object values.
|
This is due to the fact that JSON has two distinct array and object values.
|
||||||
* Example: `write_json({10, {a = false}})`, returns `"[10, {\"a\": false}]"`
|
* Example: `write_json({10, {a = false}})`, returns `"[10, {\"a\": false}]"`
|
||||||
* `minetest.serialize(table)`: returns a string
|
* `core.serialize(table)`: returns a string
|
||||||
* Convert a table containing tables, strings, numbers, booleans and `nil`s
|
* Convert a table containing tables, strings, numbers, booleans and `nil`s
|
||||||
into string form readable by `minetest.deserialize`
|
into string form readable by `core.deserialize`
|
||||||
* Example: `serialize({foo='bar'})`, returns `'return { ["foo"] = "bar" }'`
|
* Example: `serialize({foo='bar'})`, returns `'return { ["foo"] = "bar" }'`
|
||||||
* `minetest.deserialize(string)`: returns a table
|
* `core.deserialize(string)`: returns a table
|
||||||
* Convert a string returned by `minetest.deserialize` into a table
|
* Convert a string returned by `core.deserialize` into a table
|
||||||
* `string` is loaded in an empty sandbox environment.
|
* `string` is loaded in an empty sandbox environment.
|
||||||
* Will load functions, but they cannot access the global environment.
|
* Will load functions, but they cannot access the global environment.
|
||||||
* Example: `deserialize('return { ["foo"] = "bar" }')`, returns `{foo='bar'}`
|
* Example: `deserialize('return { ["foo"] = "bar" }')`, returns `{foo='bar'}`
|
||||||
* Example: `deserialize('print("foo")')`, returns `nil` (function call fails)
|
* Example: `deserialize('print("foo")')`, returns `nil` (function call fails)
|
||||||
* `error:[string "print("foo")"]:1: attempt to call global 'print' (a nil value)`
|
* `error:[string "print("foo")"]:1: attempt to call global 'print' (a nil value)`
|
||||||
* `minetest.compress(data, method, ...)`: returns `compressed_data`
|
* `core.compress(data, method, ...)`: returns `compressed_data`
|
||||||
* Compress a string of data.
|
* Compress a string of data.
|
||||||
* `method` is a string identifying the compression method to be used.
|
* `method` is a string identifying the compression method to be used.
|
||||||
* Supported compression methods:
|
* Supported compression methods:
|
||||||
@ -548,50 +553,50 @@ Call these functions only at load time!
|
|||||||
* Zstandard: `level` - Compression level. Integer or `nil`. Default `3`.
|
* Zstandard: `level` - Compression level. Integer or `nil`. Default `3`.
|
||||||
Note any supported Zstandard compression level could be used here,
|
Note any supported Zstandard compression level could be used here,
|
||||||
but these are subject to change between Zstandard versions.
|
but these are subject to change between Zstandard versions.
|
||||||
* `minetest.decompress(compressed_data, method, ...)`: returns data
|
* `core.decompress(compressed_data, method, ...)`: returns data
|
||||||
* Decompress a string of data using the algorithm specified by `method`.
|
* Decompress a string of data using the algorithm specified by `method`.
|
||||||
* See documentation on `minetest.compress()` for supported compression
|
* See documentation on `core.compress()` for supported compression
|
||||||
methods.
|
methods.
|
||||||
* `...` indicates method-specific arguments. Currently, no methods use this
|
* `...` indicates method-specific arguments. Currently, no methods use this
|
||||||
* `minetest.rgba(red, green, blue[, alpha])`: returns a string
|
* `core.rgba(red, green, blue[, alpha])`: returns a string
|
||||||
* Each argument is an 8 Bit unsigned integer
|
* Each argument is an 8 Bit unsigned integer
|
||||||
* Returns the ColorString from rgb or rgba values
|
* Returns the ColorString from rgb or rgba values
|
||||||
* Example: `minetest.rgba(10, 20, 30, 40)`, returns `"#0A141E28"`
|
* Example: `core.rgba(10, 20, 30, 40)`, returns `"#0A141E28"`
|
||||||
* `minetest.encode_base64(string)`: returns string encoded in base64
|
* `core.encode_base64(string)`: returns string encoded in base64
|
||||||
* Encodes a string in base64.
|
* Encodes a string in base64.
|
||||||
* `minetest.decode_base64(string)`: returns string or nil on failure
|
* `core.decode_base64(string)`: returns string or nil on failure
|
||||||
* Padding characters are only supported starting at version 5.4.0, where
|
* Padding characters are only supported starting at version 5.4.0, where
|
||||||
5.5.0 and newer perform proper checks.
|
5.5.0 and newer perform proper checks.
|
||||||
* Decodes a string encoded in base64.
|
* Decodes a string encoded in base64.
|
||||||
* `minetest.gettext(string)` : returns string
|
* `core.gettext(string)` : returns string
|
||||||
* look up the translation of a string in the gettext message catalog
|
* look up the translation of a string in the gettext message catalog
|
||||||
* `fgettext_ne(string, ...)`
|
* `fgettext_ne(string, ...)`
|
||||||
* call minetest.gettext(string), replace "$1"..."$9" with the given
|
* call core.gettext(string), replace "$1"..."$9" with the given
|
||||||
extra arguments and return the result
|
extra arguments and return the result
|
||||||
* `fgettext(string, ...)` : returns string
|
* `fgettext(string, ...)` : returns string
|
||||||
* same as fgettext_ne(), but calls minetest.formspec_escape before returning result
|
* same as fgettext_ne(), but calls core.formspec_escape before returning result
|
||||||
* `minetest.pointed_thing_to_face_pos(placer, pointed_thing)`: returns a position
|
* `core.pointed_thing_to_face_pos(placer, pointed_thing)`: returns a position
|
||||||
* returns the exact position on the surface of a pointed node
|
* returns the exact position on the surface of a pointed node
|
||||||
* `minetest.global_exists(name)`
|
* `core.global_exists(name)`
|
||||||
* Checks if a global variable has been set, without triggering a warning.
|
* Checks if a global variable has been set, without triggering a warning.
|
||||||
|
|
||||||
### UI
|
### UI
|
||||||
* `minetest.ui.minimap`
|
* `core.ui.minimap`
|
||||||
* Reference to the minimap object. See [`Minimap`](#minimap) class reference for methods.
|
* Reference to the minimap object. See [`Minimap`](#minimap) class reference for methods.
|
||||||
* If client disabled minimap (using enable_minimap setting) this reference will be nil.
|
* If client disabled minimap (using enable_minimap setting) this reference will be nil.
|
||||||
* `minetest.camera`
|
* `core.camera`
|
||||||
* Reference to the camera object. See [`Camera`](#camera) class reference for methods.
|
* Reference to the camera object. See [`Camera`](#camera) class reference for methods.
|
||||||
* `minetest.show_formspec(formname, formspec)` : returns true on success
|
* `core.show_formspec(formname, formspec)` : returns true on success
|
||||||
* Shows a formspec to the player
|
* Shows a formspec to the player
|
||||||
* `minetest.display_chat_message(message)` returns true on success
|
* `core.display_chat_message(message)` returns true on success
|
||||||
* Shows a chat message to the current player.
|
* Shows a chat message to the current player.
|
||||||
|
|
||||||
Setting-related
|
Setting-related
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
* `minetest.settings`: Settings object containing all of the settings from the
|
* `core.settings`: Settings object containing all of the settings from the
|
||||||
main config file (`minetest.conf`). Check lua_api.md for class reference.
|
main config file (`minetest.conf`). Check lua_api.md for class reference.
|
||||||
* `minetest.setting_get_pos(name)`: Loads a setting from the main settings and
|
* `core.setting_get_pos(name)`: Loads a setting from the main settings and
|
||||||
parses it as a position (in the format `(1,2,3)`). Returns a position or nil.
|
parses it as a position (in the format `(1,2,3)`). Returns a position or nil.
|
||||||
|
|
||||||
Class reference
|
Class reference
|
||||||
@ -821,7 +826,7 @@ It can be created via `Settings(filename)`.
|
|||||||
|
|
||||||
### NodeMetaRef
|
### NodeMetaRef
|
||||||
Node metadata: reference extra data and functionality stored in a node.
|
Node metadata: reference extra data and functionality stored in a node.
|
||||||
Can be obtained via `minetest.get_meta(pos)`.
|
Can be obtained via `core.get_meta(pos)`.
|
||||||
|
|
||||||
#### Methods
|
#### Methods
|
||||||
* `get_string(name)`
|
* `get_string(name)`
|
||||||
@ -847,7 +852,7 @@ The map is loaded as the ray advances. If the map is modified after the
|
|||||||
`Raycast` is created, the changes may or may not have an effect on the object.
|
`Raycast` is created, the changes may or may not have an effect on the object.
|
||||||
|
|
||||||
It can be created via `Raycast(pos1, pos2, objects, liquids)` or
|
It can be created via `Raycast(pos1, pos2, objects, liquids)` or
|
||||||
`minetest.raycast(pos1, pos2, objects, liquids)` where:
|
`core.raycast(pos1, pos2, objects, liquids)` where:
|
||||||
|
|
||||||
* `pos1`: start of the ray
|
* `pos1`: start of the ray
|
||||||
* `pos2`: end of the ray
|
* `pos2`: end of the ray
|
||||||
@ -861,9 +866,9 @@ It can be created via `Raycast(pos1, pos2, objects, liquids)` or
|
|||||||
|
|
||||||
-----------------
|
-----------------
|
||||||
### Definitions
|
### Definitions
|
||||||
* `minetest.get_node_def(nodename)`
|
* `core.get_node_def(nodename)`
|
||||||
* Returns [node definition](#node-definition) table of `nodename`
|
* Returns [node definition](#node-definition) table of `nodename`
|
||||||
* `minetest.get_item_def(itemstring)`
|
* `core.get_item_def(itemstring)`
|
||||||
* Returns item definition table of `itemstring`
|
* Returns item definition table of `itemstring`
|
||||||
|
|
||||||
#### Node Definition
|
#### Node Definition
|
||||||
@ -967,7 +972,7 @@ It can be created via `Raycast(pos1, pos2, objects, liquids)` or
|
|||||||
|
|
||||||
```lua
|
```lua
|
||||||
{
|
{
|
||||||
address = "minetest.example.org", -- The domain name/IP address of a remote server or "" for a local server.
|
address = "luanti.example.org", -- The domain name/IP address of a remote server or "" for a local server.
|
||||||
ip = "203.0.113.156", -- The IP address of the server.
|
ip = "203.0.113.156", -- The IP address of the server.
|
||||||
port = 30000, -- The port the client is connected to.
|
port = 30000, -- The port the client is connected to.
|
||||||
protocol_version = 30 -- Will not be accurate at start up as the client might not be connected to the server yet, in that case it will be 0.
|
protocol_version = 30 -- Will not be accurate at start up as the client might not be connected to the server yet, in that case it will be 0.
|
||||||
@ -983,23 +988,23 @@ Escape sequences
|
|||||||
Most text can contain escape sequences that can for example color the text.
|
Most text can contain escape sequences that can for example color the text.
|
||||||
There are a few exceptions: tab headers, dropdowns and vertical labels can't.
|
There are a few exceptions: tab headers, dropdowns and vertical labels can't.
|
||||||
The following functions provide escape sequences:
|
The following functions provide escape sequences:
|
||||||
* `minetest.get_color_escape_sequence(color)`:
|
* `core.get_color_escape_sequence(color)`:
|
||||||
* `color` is a [ColorString](#colorstring)
|
* `color` is a [ColorString](#colorstring)
|
||||||
* The escape sequence sets the text color to `color`
|
* The escape sequence sets the text color to `color`
|
||||||
* `minetest.colorize(color, message)`:
|
* `core.colorize(color, message)`:
|
||||||
* Equivalent to:
|
* Equivalent to:
|
||||||
`minetest.get_color_escape_sequence(color) ..
|
`core.get_color_escape_sequence(color) ..
|
||||||
message ..
|
message ..
|
||||||
minetest.get_color_escape_sequence("#ffffff")`
|
core.get_color_escape_sequence("#ffffff")`
|
||||||
* `minetest.get_background_escape_sequence(color)`
|
* `core.get_background_escape_sequence(color)`
|
||||||
* `color` is a [ColorString](#colorstring)
|
* `color` is a [ColorString](#colorstring)
|
||||||
* The escape sequence sets the background of the whole text element to
|
* The escape sequence sets the background of the whole text element to
|
||||||
`color`. Only defined for item descriptions and tooltips.
|
`color`. Only defined for item descriptions and tooltips.
|
||||||
* `minetest.strip_foreground_colors(str)`
|
* `core.strip_foreground_colors(str)`
|
||||||
* Removes foreground colors added by `get_color_escape_sequence`.
|
* Removes foreground colors added by `get_color_escape_sequence`.
|
||||||
* `minetest.strip_background_colors(str)`
|
* `core.strip_background_colors(str)`
|
||||||
* Removes background colors added by `get_background_escape_sequence`.
|
* Removes background colors added by `get_background_escape_sequence`.
|
||||||
* `minetest.strip_colors(str)`
|
* `core.strip_colors(str)`
|
||||||
* Removes all color escape sequences.
|
* Removes all color escape sequences.
|
||||||
|
|
||||||
`ColorString`
|
`ColorString`
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Compiling Minetest
|
# Compiling Luanti
|
||||||
|
|
||||||
- [Compiling on GNU/Linux](linux.md)
|
- [Compiling on GNU/Linux](linux.md)
|
||||||
- [Compiling on Windows](windows.md)
|
- [Compiling on Windows](windows.md)
|
||||||
@ -9,8 +9,8 @@
|
|||||||
|
|
||||||
General options and their default values:
|
General options and their default values:
|
||||||
|
|
||||||
BUILD_CLIENT=TRUE - Build Minetest client
|
BUILD_CLIENT=TRUE - Build Luanti client
|
||||||
BUILD_SERVER=FALSE - Build Minetest server
|
BUILD_SERVER=FALSE - Build Luanti server
|
||||||
BUILD_UNITTESTS=TRUE - Build unittest sources
|
BUILD_UNITTESTS=TRUE - Build unittest sources
|
||||||
BUILD_BENCHMARKS=FALSE - Build benchmark sources
|
BUILD_BENCHMARKS=FALSE - Build benchmark sources
|
||||||
BUILD_DOCUMENTATION=TRUE - Build doxygen documentation
|
BUILD_DOCUMENTATION=TRUE - Build doxygen documentation
|
||||||
@ -38,11 +38,11 @@ General options and their default values:
|
|||||||
ENABLE_SYSTEM_JSONCPP=ON - Use JsonCPP from system
|
ENABLE_SYSTEM_JSONCPP=ON - Use JsonCPP from system
|
||||||
RUN_IN_PLACE=FALSE - Create a portable install (worlds, settings etc. in current directory)
|
RUN_IN_PLACE=FALSE - Create a portable install (worlds, settings etc. in current directory)
|
||||||
ENABLE_UPDATE_CHECKER=TRUE - Whether to enable update checks by default
|
ENABLE_UPDATE_CHECKER=TRUE - Whether to enable update checks by default
|
||||||
INSTALL_DEVTEST=FALSE - Whether the Development Test game should be installed alongside Minetest
|
INSTALL_DEVTEST=FALSE - Whether the Development Test game should be installed alongside Luanti
|
||||||
USE_GPROF=FALSE - Enable profiling using GProf
|
USE_GPROF=FALSE - Enable profiling using GProf
|
||||||
BUILD_WITH_TRACY=FALSE - Fetch and build with the Tracy profiler client
|
BUILD_WITH_TRACY=FALSE - Fetch and build with the Tracy profiler client
|
||||||
FETCH_TRACY_GIT_TAG=master - Git tag for fetching Tracy client. Match with your server (gui) version
|
FETCH_TRACY_GIT_TAG=master - Git tag for fetching Tracy client. Match with your server (gui) version
|
||||||
VERSION_EXTRA= - Text to append to version (e.g. VERSION_EXTRA=foobar -> Minetest 0.4.9-foobar)
|
VERSION_EXTRA= - Text to append to version (e.g. VERSION_EXTRA=foobar -> Luanti 5.10.0-foobar)
|
||||||
|
|
||||||
Library specific options:
|
Library specific options:
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ There are other optional libraries, but they are not tested if they can build an
|
|||||||
Use `--triplet` to specify the target triplet, e.g. `x64-windows` or `x86-windows`.
|
Use `--triplet` to specify the target triplet, e.g. `x64-windows` or `x86-windows`.
|
||||||
|
|
||||||
|
|
||||||
## Compile Minetest
|
## Compile Luanti
|
||||||
|
|
||||||
### a) Using the vcpkg toolchain and CMake GUI
|
### a) Using the vcpkg toolchain and CMake GUI
|
||||||
|
|
||||||
@ -46,7 +46,7 @@ Use `--triplet` to specify the target triplet, e.g. `x64-windows` or `x86-window
|
|||||||
11. If there are any errors, solve them and hit **Configure**
|
11. If there are any errors, solve them and hit **Configure**
|
||||||
12. Click **Generate**
|
12. Click **Generate**
|
||||||
13. Click **Open Project**
|
13. Click **Open Project**
|
||||||
14. Compile Minetest inside Visual studio.
|
14. Compile Luanti inside Visual studio.
|
||||||
|
|
||||||
### b) Using the vcpkg toolchain and the commandline
|
### b) Using the vcpkg toolchain and the commandline
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ Some important development docs are found in the wiki: https://dev.minetest.net/
|
|||||||
|
|
||||||
Notable pages:
|
Notable pages:
|
||||||
|
|
||||||
- [Releasing Minetest](https://dev.minetest.net/Releasing_Minetest)
|
- [Releasing Luanti](https://dev.minetest.net/Releasing_Minetest)
|
||||||
- [Engine translations](https://dev.minetest.net/Translation#Maintaining_engine_translations)
|
- [Engine translations](https://dev.minetest.net/Translation#Maintaining_engine_translations)
|
||||||
- [Changelog](https://dev.minetest.net/Changelog)
|
- [Changelog](https://dev.minetest.net/Changelog)
|
||||||
- [Organisation](https://dev.minetest.net/Organisation)
|
- [Organisation](https://dev.minetest.net/Organisation)
|
||||||
|
@ -21,7 +21,7 @@ After that installing it will work:
|
|||||||
adb install -r -d ./app-arm64-v8a-release-unsigned.apk
|
adb install -r -d ./app-arm64-v8a-release-unsigned.apk
|
||||||
```
|
```
|
||||||
|
|
||||||
## How to get debug output from Minetest on Android
|
## How to get debug output from Luanti on Android
|
||||||
|
|
||||||
In case debug.txt isn't enough (e.g. when debugging a crash), you can get debug
|
In case debug.txt isn't enough (e.g. when debugging a crash), you can get debug
|
||||||
output using logcat:
|
output using logcat:
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
# Miscellaneous
|
# Miscellaneous
|
||||||
|
|
||||||
## Profiling Minetest on Linux with perf
|
## Profiling Luanti on Linux with perf
|
||||||
|
|
||||||
We will be using a tool called "perf", which you can get by installing `perf` or `linux-perf` or `linux-tools-common`.
|
We will be using a tool called "perf", which you can get by installing `perf` or `linux-perf` or `linux-tools-common`.
|
||||||
|
|
||||||
To get usable results you need to build Minetest with debug symbols
|
To get usable results you need to build Luanti with debug symbols
|
||||||
(`-DCMAKE_BUILD_TYPE=RelWithDebInfo` or `-DCMAKE_BUILD_TYPE=Debug`).
|
(`-DCMAKE_BUILD_TYPE=RelWithDebInfo` or `-DCMAKE_BUILD_TYPE=Debug`).
|
||||||
|
|
||||||
Run the client (or server) like this and do whatever you wanted to test:
|
Run the client (or server) like this and do whatever you wanted to test:
|
||||||
@ -48,20 +48,20 @@ It allows one to annotate important functions and generate traces, where one can
|
|||||||
see when each individual function call happened, and how long it took.
|
see when each individual function call happened, and how long it took.
|
||||||
|
|
||||||
Tracy can also record when frames, e.g. server step, start and end, and inspect
|
Tracy can also record when frames, e.g. server step, start and end, and inspect
|
||||||
frames that took longer than usual. Minetest already contains annotations for
|
frames that took longer than usual. Luanti already contains annotations for
|
||||||
its frames.
|
its frames.
|
||||||
|
|
||||||
See also [Tracy's official documentation](https://github.com/wolfpld/tracy/releases/latest/download/tracy.pdf).
|
See also [Tracy's official documentation](https://github.com/wolfpld/tracy/releases/latest/download/tracy.pdf).
|
||||||
|
|
||||||
### Installing
|
### Installing
|
||||||
|
|
||||||
Tracy consists of a client (Minetest) and a server (the gui).
|
Tracy consists of a client (Luanti) and a server (the gui).
|
||||||
|
|
||||||
Install the server, e.g. using your package manager.
|
Install the server, e.g. using your package manager.
|
||||||
|
|
||||||
### Building
|
### Building
|
||||||
|
|
||||||
Build Minetest with `-DDBUILD_WITH_TRACY=1`, this will fetch Tracy for building
|
Build Luanti with `-DDBUILD_WITH_TRACY=1`, this will fetch Tracy for building
|
||||||
the Tracy client. And use `FETCH_TRACY_GIT_TAG` to get a version matching your
|
the Tracy client. And use `FETCH_TRACY_GIT_TAG` to get a version matching your
|
||||||
Tracy server, e.g. `-DFETCH_TRACY_GIT_TAG=v0.11.0` if it's `0.11.0`.
|
Tracy server, e.g. `-DFETCH_TRACY_GIT_TAG=v0.11.0` if it's `0.11.0`.
|
||||||
|
|
||||||
@ -74,7 +74,7 @@ See Tracy's documentation for more build options.
|
|||||||
|
|
||||||
### Using in C++
|
### Using in C++
|
||||||
|
|
||||||
Start the Tracy server and Minetest. You should see Minetest in the menu.
|
Start the Tracy server and Luanti. You should see Luanti in the menu.
|
||||||
|
|
||||||
To actually get useful traces, you have to annotate functions with `ZoneScoped`
|
To actually get useful traces, you have to annotate functions with `ZoneScoped`
|
||||||
macros and recompile. Please refer to Tracy's official documentation.
|
macros and recompile. Please refer to Tracy's official documentation.
|
||||||
@ -82,7 +82,7 @@ macros and recompile. Please refer to Tracy's official documentation.
|
|||||||
### Using in Lua
|
### Using in Lua
|
||||||
|
|
||||||
Tracy also supports Lua.
|
Tracy also supports Lua.
|
||||||
If built with Tracy, Minetest loads its API in the global `tracy` table.
|
If built with Tracy, Luanti loads its API in the global `tracy` table.
|
||||||
See Tracy's official documentation for more information.
|
See Tracy's official documentation for more information.
|
||||||
|
|
||||||
Note: The whole Tracy Lua API is accessible to all mods. And we don't check if it
|
Note: The whole Tracy Lua API is accessible to all mods. And we don't check if it
|
||||||
|
@ -2,7 +2,7 @@ OS/library compatibility policy
|
|||||||
===============================
|
===============================
|
||||||
|
|
||||||
This document describes how we decide which minimum versions of operating systems, C++ standards,
|
This document describes how we decide which minimum versions of operating systems, C++ standards,
|
||||||
libraries, build tools (CMake) or compilers Minetest requires.
|
libraries, build tools (CMake) or compilers Luanti requires.
|
||||||
|
|
||||||
Most important is that we do not increase our minimum requirements without a reason or use case.
|
Most important is that we do not increase our minimum requirements without a reason or use case.
|
||||||
A reason can be as simple as "cleaning up legacy support code", but it needs to exist.
|
A reason can be as simple as "cleaning up legacy support code", but it needs to exist.
|
||||||
@ -54,7 +54,7 @@ OpenGL ES 2.0 is supported for the sake of mobile platforms.
|
|||||||
It has been [proposed](https://irc.minetest.net/minetest-dev/2022-08-18) moving to OpenGL 2.x or 3.0 with shaders required.
|
It has been [proposed](https://irc.minetest.net/minetest-dev/2022-08-18) moving to OpenGL 2.x or 3.0 with shaders required.
|
||||||
|
|
||||||
General **system requirements** are not bounded either.
|
General **system requirements** are not bounded either.
|
||||||
Being able to play Minetest on a recent low-end phone is a reasonable target.
|
Being able to play Luanti on a recent low-end phone is a reasonable target.
|
||||||
|
|
||||||
## On totality
|
## On totality
|
||||||
|
|
||||||
@ -71,7 +71,7 @@ Sound is optional at build-time but nobody would call an engine build without so
|
|||||||
|
|
||||||
In general also consider:
|
In general also consider:
|
||||||
* Is the proposition important enough to warrant a new dependency?
|
* Is the proposition important enough to warrant a new dependency?
|
||||||
* Can we make it easier for users to build the library together with Minetest?
|
* Can we make it easier for users to build the library together with Luanti?
|
||||||
* Maybe even vendor the library?
|
* Maybe even vendor the library?
|
||||||
* Or could the engine include a transparent fallback implementation?
|
* Or could the engine include a transparent fallback implementation?
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Minetest Direction Document
|
# Luanti Direction Document
|
||||||
|
|
||||||
## 1. Long-term Roadmap
|
## 1. Long-term Roadmap
|
||||||
|
|
||||||
@ -12,7 +12,7 @@ following documents:
|
|||||||
|
|
||||||
## 2. Medium-term Roadmap
|
## 2. Medium-term Roadmap
|
||||||
|
|
||||||
These are the current medium-term goals for Minetest development, in no
|
These are the current medium-term goals for Luanti development, in no
|
||||||
particular order.
|
particular order.
|
||||||
|
|
||||||
These goals were created from the top points in a
|
These goals were created from the top points in a
|
||||||
@ -42,7 +42,7 @@ alternative libraries to replace Irrlicht functionality as needed
|
|||||||
|
|
||||||
### 2.2 Internal code refactoring
|
### 2.2 Internal code refactoring
|
||||||
|
|
||||||
To ensure sustainable development, Minetest's code needs to be
|
To ensure sustainable development, Luanti's code needs to be
|
||||||
[refactored and improved](https://github.com/minetest/minetest/pulls?q=is%3Aopen+sort%3Aupdated-desc+label%3A%22Code+quality%22+).
|
[refactored and improved](https://github.com/minetest/minetest/pulls?q=is%3Aopen+sort%3Aupdated-desc+label%3A%22Code+quality%22+).
|
||||||
This will remove code rot and allow for more efficient development.
|
This will remove code rot and allow for more efficient development.
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ be a replacement for HUDs, allowing for a unified API.
|
|||||||
|
|
||||||
A [new mainmenu](https://github.com/minetest/minetest/issues/6733) is needed to
|
A [new mainmenu](https://github.com/minetest/minetest/issues/6733) is needed to
|
||||||
improve user experience. First impressions matter, and the current main menu
|
improve user experience. First impressions matter, and the current main menu
|
||||||
doesn't do a very good job at selling Minetest or explaining what it is.
|
doesn't do a very good job at selling Luanti or explaining what it is.
|
||||||
A new main menu should promote games to users, allowing Minetest Game to no
|
A new main menu should promote games to users, allowing Minetest Game to no
|
||||||
longer be bundled by default.
|
longer be bundled by default.
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Docker Server
|
# Docker Server
|
||||||
|
|
||||||
We provide Minetest server Docker images using the GitHub container registry.
|
We provide Luanti server Docker images using the GitHub container registry.
|
||||||
|
|
||||||
Images are built on each commit and available using the following tag scheme:
|
Images are built on each commit and available using the following tag scheme:
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ The IDE will open the folder and display the open project wizard:
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
CLion try to determine a base configuration, but Minetest define it's own presets for easier setup. So you need to
|
CLion try to determine a base configuration, but Luanti define it's own presets for easier setup. So you need to
|
||||||
delete the `Debug` profile with the `-` sign and close the dialog.
|
delete the `Debug` profile with the `-` sign and close the dialog.
|
||||||
|
|
||||||
You should notice a notification telling you 4 presets have been loaded in the bottom right corner.
|
You should notice a notification telling you 4 presets have been loaded in the bottom right corner.
|
||||||
@ -61,7 +61,7 @@ Then, the process is roughly similar to Linux, you just need to pick `Visual Stu
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
[Vcpkg](https://vcpkg.io) is the recommended way of installing Minetest dependencies.
|
[Vcpkg](https://vcpkg.io) is the recommended way of installing Luanti dependencies.
|
||||||
|
|
||||||
You need to let CLion know about a `vcpkg` installation to let the bundled CMake use the dependencies seamlessly and get
|
You need to let CLion know about a `vcpkg` installation to let the bundled CMake use the dependencies seamlessly and get
|
||||||
IDE integration. (Require CLion 2023 or later)
|
IDE integration. (Require CLion 2023 or later)
|
||||||
@ -70,7 +70,7 @@ Go to `View > Tool Windows > Vcpkg` and click the add button. I will open a popu
|
|||||||
installation. By default it will download a new one that you can use to install your dependencies, but if you already
|
installation. By default it will download a new one that you can use to install your dependencies, but if you already
|
||||||
have one installed or you do not plan on using CLion only then install Vcpkg by hand and select your installation
|
have one installed or you do not plan on using CLion only then install Vcpkg by hand and select your installation
|
||||||
directory. Don't forget to check `Add vcpkg installation to existing CMake profiles`. If you haven't already installed
|
directory. Don't forget to check `Add vcpkg installation to existing CMake profiles`. If you haven't already installed
|
||||||
Minetest dependencies in your vcpkg installation, you can do it right from CLion's Vcpkg tool window.
|
Luanti dependencies in your vcpkg installation, you can do it right from CLion's Vcpkg tool window.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
@ -2,6 +2,6 @@
|
|||||||
|
|
||||||
From the Visual Studio installer, you need to install the `Desktop development with C++` Workload. You need to make sure the `C++ CMake tools for Windows` component is included in the installation details panel.
|
From the Visual Studio installer, you need to install the `Desktop development with C++` Workload. You need to make sure the `C++ CMake tools for Windows` component is included in the installation details panel.
|
||||||
|
|
||||||
You need to install [Vcpkg](https://vcpkg.io) and install Minetest dependencies as stated in the compilation documentation.
|
You need to install [Vcpkg](https://vcpkg.io) and install Luanti dependencies as stated in the compilation documentation.
|
||||||
|
|
||||||
For the packages to be discoverable and used by Visual Studio, you need to run `vcpkg integrate install`.
|
For the packages to be discoverable and used by Visual Studio, you need to run `vcpkg integrate install`.
|
||||||
|
@ -9,7 +9,7 @@ extension pack manually by downloading the VSIX files and going to `Extensions >
|
|||||||
|
|
||||||
CMake support for VSCode uses CMake presets provided by the project by default.
|
CMake support for VSCode uses CMake presets provided by the project by default.
|
||||||
|
|
||||||
When you open the Minetest folder with VSCode, you should get a quick pick asking you for the default preset.
|
When you open the Luanti folder with VSCode, you should get a quick pick asking you for the default preset.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@ -34,9 +34,9 @@ Under Windows, the recommended compiler is the [Visual Studio](https://visualstu
|
|||||||
|
|
||||||
From the Visual Studio installer, you need to install the `Desktop development with C++` Workload.
|
From the Visual Studio installer, you need to install the `Desktop development with C++` Workload.
|
||||||
|
|
||||||
[Vcpkg](https://vcpkg.io) is the recommended way of installing Minetest dependencies.
|
[Vcpkg](https://vcpkg.io) is the recommended way of installing Luanti dependencies.
|
||||||
|
|
||||||
Follow the official documentation to install it and install Minetest dependencies as explained in [Windows compilation process](../compiling/windows.md).
|
Follow the official documentation to install it and install Luanti dependencies as explained in [Windows compilation process](../compiling/windows.md).
|
||||||
|
|
||||||
You need to let CMake know about the `vcpkg` installation in VSCode.
|
You need to let CMake know about the `vcpkg` installation in VSCode.
|
||||||
|
|
||||||
|
1341
doc/lua_api.md
1341
doc/lua_api.md
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
|||||||
Minetest Lua Mainmenu API Reference 5.10.0
|
Luanti Lua Mainmenu API Reference 5.10.0
|
||||||
=========================================
|
========================================
|
||||||
|
|
||||||
Introduction
|
Introduction
|
||||||
-------------
|
-------------
|
||||||
@ -128,7 +128,7 @@ HTTP Requests
|
|||||||
* returns `HTTPApiTable` containing http functions.
|
* returns `HTTPApiTable` containing http functions.
|
||||||
* The returned table contains the functions `fetch_sync`, `fetch_async` and
|
* The returned table contains the functions `fetch_sync`, `fetch_async` and
|
||||||
`fetch_async_get` described below.
|
`fetch_async_get` described below.
|
||||||
* Function only exists if minetest server was built with cURL support.
|
* Function only exists if Luanti server was built with cURL support.
|
||||||
* `HTTPApiTable.fetch_sync(HTTPRequest req)`: returns HTTPRequestResult
|
* `HTTPApiTable.fetch_sync(HTTPRequest req)`: returns HTTPRequestResult
|
||||||
* Performs given request synchronously
|
* Performs given request synchronously
|
||||||
* `HTTPApiTable.fetch_async(HTTPRequest req)`: returns handle
|
* `HTTPApiTable.fetch_async(HTTPRequest req)`: returns handle
|
||||||
@ -155,7 +155,7 @@ Used by `HTTPApiTable.fetch` and `HTTPApiTable.fetch_async`.
|
|||||||
-- If post_data is not specified, a GET request is performed instead.
|
-- If post_data is not specified, a GET request is performed instead.
|
||||||
|
|
||||||
user_agent = "ExampleUserAgent",
|
user_agent = "ExampleUserAgent",
|
||||||
-- Optional, if specified replaces the default minetest user agent with
|
-- Optional, if specified replaces the default Luanti user agent with
|
||||||
-- given string
|
-- given string
|
||||||
|
|
||||||
extra_headers = { "Accept-Language: en-us", "Accept-Charset: utf-8" },
|
extra_headers = { "Accept-Language: en-us", "Accept-Charset: utf-8" },
|
||||||
@ -257,7 +257,7 @@ GUI
|
|||||||
y = 577,
|
y = 577,
|
||||||
},
|
},
|
||||||
|
|
||||||
-- Estimated maximum formspec size before Minetest will start shrinking the
|
-- Estimated maximum formspec size before Luanti will start shrinking the
|
||||||
-- formspec to fit. For a fullscreen formspec, use this formspec size and
|
-- formspec to fit. For a fullscreen formspec, use this formspec size and
|
||||||
-- `padding[0,0]`. `bgcolor[;true]` is also recommended.
|
-- `padding[0,0]`. `bgcolor[;true]` is also recommended.
|
||||||
max_formspec_size = {
|
max_formspec_size = {
|
||||||
@ -295,7 +295,7 @@ Package - content which is downloadable from the content db, may or may not be i
|
|||||||
* `core.get_modpaths()` (possible in async calls)
|
* `core.get_modpaths()` (possible in async calls)
|
||||||
* returns table of virtual path to global modpaths, where mods have been installed
|
* returns table of virtual path to global modpaths, where mods have been installed
|
||||||
The difference with `core.get_modpath` is that no mods should be installed in these
|
The difference with `core.get_modpath` is that no mods should be installed in these
|
||||||
directories by Minetest -- they might be read-only.
|
directories by Luanti -- they might be read-only.
|
||||||
|
|
||||||
Ex:
|
Ex:
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
cat ../lua_api.md | csplit -sz -f docs/section - '/^=/-1' '{*}'
|
cat ../lua_api.md | csplit -sz -f docs/section - '/^=/-1' '{*}'
|
||||||
|
|
||||||
cat > mkdocs.yml << EOF
|
cat > mkdocs.yml << EOF
|
||||||
site_name: Minetest API Documentation
|
site_name: Luanti API Documentation
|
||||||
theme:
|
theme:
|
||||||
name: readthedocs
|
name: readthedocs
|
||||||
highlightjs: False
|
highlightjs: False
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
Minetest protocol (incomplete, early draft):
|
Luanti protocol (incomplete, early draft):
|
||||||
Updated 2011-06-18
|
Updated 2011-06-18
|
||||||
|
|
||||||
A custom protocol over UDP.
|
A custom protocol over UDP.
|
||||||
@ -70,7 +70,7 @@ function check_if_minetestserver_up($host, $port)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
- Here's a Python script for checking if a minetest server is up, confirmed working
|
- Here's a Python script for checking if a Luanti server is up, confirmed working
|
||||||
|
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
import sys, time, socket
|
import sys, time, socket
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
Minetest Texture Pack Reference
|
Luanti Texture Pack Reference
|
||||||
===============================
|
===============================
|
||||||
|
|
||||||
Texture packs allow you to replace textures provided by a mod with your own
|
Texture packs allow you to replace textures provided by a mod with your own
|
||||||
@ -25,7 +25,7 @@ texture pack. The name must not be “base”.
|
|||||||
### `texture_pack.conf`
|
### `texture_pack.conf`
|
||||||
A key-value config file with the following keys:
|
A key-value config file with the following keys:
|
||||||
|
|
||||||
* `name`: The texture pack name. Allows Minetest to determine the texture pack name even if
|
* `name`: The texture pack name. Allows Luanti to determine the texture pack name even if
|
||||||
the folder is wrongly named.
|
the folder is wrongly named.
|
||||||
* `title` - human-readable title
|
* `title` - human-readable title
|
||||||
* `description` - short description, shown in the content tab
|
* `description` - short description, shown in the content tab
|
||||||
@ -107,9 +107,9 @@ by texture packs. All existing fallback textures can be found in the directory
|
|||||||
* `progress_bar.png`: foreground texture of the loading screen's progress bar
|
* `progress_bar.png`: foreground texture of the loading screen's progress bar
|
||||||
* `progress_bar_bg.png`: background texture of the loading screen's progress bar
|
* `progress_bar_bg.png`: background texture of the loading screen's progress bar
|
||||||
|
|
||||||
* `moon.png`: texture of the moon. Default texture is generated by Minetest
|
* `moon.png`: texture of the moon. Default texture is generated by Luanti
|
||||||
* `moon_tonemap.png`: tonemap to be used when `moon.png` was found
|
* `moon_tonemap.png`: tonemap to be used when `moon.png` was found
|
||||||
* `sun.png`: texture of the sun. Default texture is generated by Minetest
|
* `sun.png`: texture of the sun. Default texture is generated by Luanti
|
||||||
* `sun_tonemap.png`: tonemap to be used when `sun.png` was found
|
* `sun_tonemap.png`: tonemap to be used when `sun.png` was found
|
||||||
* `sunrisebg.png`: shown sky texture when the sun rises
|
* `sunrisebg.png`: shown sky texture when the sun rises
|
||||||
|
|
||||||
@ -226,7 +226,7 @@ The special* targets only apply to specific drawtypes:
|
|||||||
Designing leaves textures for the leaves rendering options
|
Designing leaves textures for the leaves rendering options
|
||||||
----------------------------------------------------------
|
----------------------------------------------------------
|
||||||
|
|
||||||
Minetest has three modes for rendering leaves nodes if the node has the
|
Luanti has three modes for rendering leaves nodes if the node has the
|
||||||
`allfaces_optional` drawtype.
|
`allfaces_optional` drawtype.
|
||||||
|
|
||||||
### Fancy
|
### Fancy
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Minetest World Format 22...29
|
# Luanti World Format 22...29
|
||||||
|
|
||||||
This applies to a world format carrying the block serialization version
|
This applies to a world format carrying the block serialization version
|
||||||
22...27, used at least in
|
22...27, used at least in
|
||||||
@ -249,14 +249,14 @@ Example content:
|
|||||||
|
|
||||||
# Map File Format
|
# Map File Format
|
||||||
|
|
||||||
Minetest maps consist of `MapBlock`s, chunks of 16x16x16 nodes.
|
Luanti maps consist of `MapBlock`s, chunks of 16x16x16 nodes.
|
||||||
|
|
||||||
In addition to the bulk node data, `MapBlock`s stored on disk also contain
|
In addition to the bulk node data, `MapBlock`s stored on disk also contain
|
||||||
other things.
|
other things.
|
||||||
|
|
||||||
## History
|
## History
|
||||||
|
|
||||||
Initially, Minetest stored maps in a format called the "sectors" format.
|
Initially, Luanti stored maps in a format called the "sectors" format.
|
||||||
It was a directory/file structure like this:
|
It was a directory/file structure like this:
|
||||||
|
|
||||||
sectors2/XXX/ZZZ/YYYY
|
sectors2/XXX/ZZZ/YYYY
|
||||||
@ -265,7 +265,7 @@ For example, the `MapBlock` at `(0, 1, -2)` was this file:
|
|||||||
|
|
||||||
sectors2/000/ffd/0001
|
sectors2/000/ffd/0001
|
||||||
|
|
||||||
Eventually Minetest outgrew this directory structure, as filesystems were
|
Eventually Luanti outgrew this directory structure, as filesystems were
|
||||||
struggling under the number of files and directories.
|
struggling under the number of files and directories.
|
||||||
|
|
||||||
Large servers seriously needed a new format, and thus the base of the
|
Large servers seriously needed a new format, and thus the base of the
|
||||||
@ -370,7 +370,7 @@ See below for description.
|
|||||||
* Indicates if the light is correct at the sides of a map block.
|
* Indicates if the light is correct at the sides of a map block.
|
||||||
Lighting may not be correct if the light changed, but a neighbor
|
Lighting may not be correct if the light changed, but a neighbor
|
||||||
block was not loaded at that time.
|
block was not loaded at that time.
|
||||||
If these flags are false, Minetest will automatically recompute light
|
If these flags are false, Luanti will automatically recompute light
|
||||||
when both this block and its required neighbor are loaded.
|
when both this block and its required neighbor are loaded.
|
||||||
|
|
||||||
* The bit order is:
|
* The bit order is:
|
||||||
@ -383,7 +383,7 @@ See below for description.
|
|||||||
to indicate if direct sunlight spreading is finished.
|
to indicate if direct sunlight spreading is finished.
|
||||||
|
|
||||||
* Example: if the block at `(0, 0, 0)` has `lighting_complete = 0b1111111111111110`,
|
* Example: if the block at `(0, 0, 0)` has `lighting_complete = 0b1111111111111110`,
|
||||||
Minetest will correct lighting in the day light bank when the block at
|
Luanti will correct lighting in the day light bank when the block at
|
||||||
`(1, 0, 0)` is also loaded.
|
`(1, 0, 0)` is also loaded.
|
||||||
|
|
||||||
Timestamp and node ID mappings were introduced in map format version 29.
|
Timestamp and node ID mappings were introduced in map format version 29.
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>Minetest API documentation</title>
|
<title>Luanti API documentation</title>
|
||||||
|
|
||||||
<link rel="canonical" href="https://api.minetest.netURL">
|
<link rel="canonical" href="https://api.minetest.netURL">
|
||||||
<meta http-equiv="refresh" content="0; url=https://api.minetest.netURL">
|
<meta http-equiv="refresh" content="0; url=https://api.minetest.netURL">
|
||||||
|
Reference in New Issue
Block a user