Module api.lua
World Data Manager API
Functions
wdata.read (fname) | Reads config file from world directory. |
wdata.write (fname, data[, styled]) | Writes to config file in world directory. |
Aliases
minetest.read_world_config | Alias of wdata.read. |
minetest.write_world_config | Alias of wdata.write. |
Functions
- wdata.read (fname)
-
Reads config file from world directory.
Parameters:
- fname string Base filename with optional directory structure (e.g. "mymod/myconfig")
Returns:
-
table
Table with contents read from json file or
nil
. - wdata.write (fname, data[, styled])
-
Writes to config file in world directory.
Parameters:
- fname string Base filename with optional directory structure (e.g. "mymod/myconfig").
- data table Table data to be written to config file.
- styled
bool
Outputs in a human-readable format if this is set (default:
true
). (optional)
Returns:
-
bool
true
if succeeded,false
if not.
Aliases
- minetest.read_world_config
- Alias of wdata.read.
- minetest.write_world_config
- Alias of wdata.write.