forked from Mirrorlandia_minetest/minetest
Clarify documentation of minetest.get_modpath and minetest.get_modnames (#10771)
This commit is contained in:
parent
92aac69b36
commit
ad58fb2206
@ -4327,11 +4327,14 @@ Utilities
|
|||||||
|
|
||||||
* `minetest.get_current_modname()`: returns the currently loading mod's name,
|
* `minetest.get_current_modname()`: returns the currently loading mod's name,
|
||||||
when loading a mod.
|
when loading a mod.
|
||||||
* `minetest.get_modpath(modname)`: returns e.g.
|
* `minetest.get_modpath(modname)`: returns the directory path for a mod,
|
||||||
`"/home/user/.minetest/usermods/modname"`.
|
e.g. `"/home/user/.minetest/usermods/modname"`.
|
||||||
* Useful for loading additional `.lua` modules or static data from mod
|
* Returns nil if the mod is not enabled or does not exist (not installed).
|
||||||
* `minetest.get_modnames()`: returns a list of installed mods
|
* Works regardless of whether the mod has been loaded yet.
|
||||||
* Return a list of installed mods, sorted alphabetically
|
* Useful for loading additional `.lua` modules or static data from a mod,
|
||||||
|
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_worldpath()`: returns e.g. `"/home/user/.minetest/world"`
|
* `minetest.get_worldpath()`: returns e.g. `"/home/user/.minetest/world"`
|
||||||
* Useful for storing custom data
|
* Useful for storing custom data
|
||||||
* `minetest.is_singleplayer()`
|
* `minetest.is_singleplayer()`
|
||||||
|
Loading…
Reference in New Issue
Block a user