mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-16 18:01:40 +00:00
Add minetest.get_game_info
and allow reading game.conf
(#12989)
Co-authored-by: sfan5 <sfan5@live.de>
This commit is contained in:
parent
3fd5bff128
commit
d0a118f5b1
7 changed files with 52 additions and 0 deletions
|
@ -4879,6 +4879,18 @@ Utilities
|
|||
or checking if a mod is enabled.
|
||||
* `minetest.get_modnames()`: returns a list of enabled mods, sorted alphabetically.
|
||||
* Does not include disabled mods, even if they are installed.
|
||||
* `minetest.get_game_info()`: returns a table containing information about the
|
||||
current game. Note that other meta information (e.g. version/release number)
|
||||
can be manually read from `game.conf` in the game's root directory.
|
||||
|
||||
{
|
||||
id = string,
|
||||
title = string,
|
||||
author = string,
|
||||
-- The root directory of the game
|
||||
path = string,
|
||||
}
|
||||
|
||||
* `minetest.get_worldpath()`: returns e.g. `"/home/user/.minetest/world"`
|
||||
* Useful for storing custom data
|
||||
* `minetest.is_singleplayer()`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue