mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Add core.mkdir
This commit is contained in:
parent
3a8c788880
commit
05ab9973f9
3 changed files with 49 additions and 33 deletions
|
@ -1674,36 +1674,36 @@ Helper functions
|
|||
* Useful for storing custom data
|
||||
* `minetest.is_singleplayer()`
|
||||
* `minetest.features`
|
||||
* table containing API feature flags: `{foo=true, bar=true}`
|
||||
* Table containing API feature flags: `{foo=true, bar=true}`
|
||||
* `minetest.has_feature(arg)`: returns `boolean, missing_features`
|
||||
* `arg`: string or table in format `{foo=true, bar=true}`
|
||||
* `missing_features`: `{foo=true, bar=true}`
|
||||
* `minetest.get_player_information(playername)`
|
||||
* table containing information about player peer.
|
||||
|
||||
Example of `minetest.get_player_information` return value:
|
||||
|
||||
{
|
||||
address = "127.0.0.1", -- IP address of client
|
||||
ip_version = 4, -- IPv4 / IPv6
|
||||
min_rtt = 0.01, -- minimum round trip time
|
||||
max_rtt = 0.2, -- maximum round trip time
|
||||
avg_rtt = 0.02, -- average round trip time
|
||||
min_jitter = 0.01, -- minimum packet time jitter
|
||||
max_jitter = 0.5, -- maximum packet time jitter
|
||||
avg_jitter = 0.03, -- average packet time jitter
|
||||
connection_uptime = 200, -- seconds since client connected
|
||||
|
||||
-- following information is available on debug build only!!!
|
||||
-- DO NOT USE IN MODS
|
||||
--ser_vers = 26, -- serialization version used by client
|
||||
--prot_vers = 23, -- protocol version used by client
|
||||
--major = 0, -- major version number
|
||||
--minor = 4, -- minor version number
|
||||
--patch = 10, -- patch version number
|
||||
--vers_string = "0.4.9-git", -- full version string
|
||||
--state = "Active" -- current client state
|
||||
}
|
||||
* `minetest.get_player_information(player_name)`: returns a table containing
|
||||
information about player. Example return value:
|
||||
{
|
||||
address = "127.0.0.1", -- IP address of client
|
||||
ip_version = 4, -- IPv4 / IPv6
|
||||
min_rtt = 0.01, -- minimum round trip time
|
||||
max_rtt = 0.2, -- maximum round trip time
|
||||
avg_rtt = 0.02, -- average round trip time
|
||||
min_jitter = 0.01, -- minimum packet time jitter
|
||||
max_jitter = 0.5, -- maximum packet time jitter
|
||||
avg_jitter = 0.03, -- average packet time jitter
|
||||
connection_uptime = 200, -- seconds since client connected
|
||||
|
||||
-- following information is available on debug build only!!!
|
||||
-- DO NOT USE IN MODS
|
||||
--ser_vers = 26, -- serialization version used by client
|
||||
--prot_vers = 23, -- protocol version used by client
|
||||
--major = 0, -- major version number
|
||||
--minor = 4, -- minor version number
|
||||
--patch = 10, -- patch version number
|
||||
--vers_string = "0.4.9-git", -- full version string
|
||||
--state = "Active" -- current client state
|
||||
}
|
||||
* `minetest.mkdir(path)`: returns success.
|
||||
* Creates a directory specified by `path`, creating parent directories
|
||||
if they don't exist.
|
||||
|
||||
### Logging
|
||||
* `minetest.debug(line)`
|
||||
|
@ -2282,11 +2282,8 @@ These functions return the leftover itemstack.
|
|||
the floor or ceiling
|
||||
* The first four options are mutually-exclusive; the last in the list takes
|
||||
precedence over the first.
|
||||
|
||||
|
||||
|
||||
* `minetest.rotate_node(itemstack, placer, pointed_thing)`
|
||||
* calls `rotate_and_place()` with infinitestacks set according to the state of
|
||||
* calls `rotate_and_place()` with infinitestacks set according to the state of
|
||||
the creative mode setting, and checks for "sneak" to set the `invert_wall`
|
||||
parameter.
|
||||
|
||||
|
@ -2306,7 +2303,7 @@ minetest.global_exists(name)
|
|||
* Any function in the minetest namespace can be called using the syntax
|
||||
`minetest.env:somefunction(somearguments)`
|
||||
instead of `minetest.somefunction(somearguments)`
|
||||
* Deprecated, but support is not to be dropped soon
|
||||
* Deprecated, but support is not to be dropped soon
|
||||
|
||||
### Global tables
|
||||
* `minetest.registered_items`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue