1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-01 17:38:41 +00:00

Add world-independent storage directory for mods (#12315)

Fixes #4821
This commit is contained in:
rubenwardy 2024-03-24 17:18:58 +00:00 committed by GitHub
parent b42b03bc40
commit 6c4a110679
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 44 additions and 0 deletions

View file

@ -5306,6 +5306,12 @@ Utilities
* `minetest.get_worldpath()`: returns e.g. `"/home/user/.minetest/world"`
* Useful for storing custom data
* `minetest.get_mod_data_path()`: returns e.g. `"/home/user/.minetest/mod_data/mymod"`
* Useful for storing custom data *independently of worlds*.
* Must be called during mod load time.
* Can read or write to this directory at any time.
* It's possible that multiple Minetest instances are running at the same
time, which may lead to corruption if you are not careful.
* `minetest.is_singleplayer()`
* `minetest.features`: Table containing API feature flags