Description:
A library for managing data files in the world directory.
It takes a little work to read from & write to data in the world directory. wdata
aims to make that easier by utilizing just two simple methods.
This mod is essentially an alternative to Minetest's built-in StorageRef but adds some features & customizations.
Licensing:
Usage:
There are two methods:
wdata.read(fname)
- reads json data from file in world directory & converts to a table.
- parameters:
- fname: File basename without suffix (e.g. "my_config" or "my_mod/my_config").
wdata.write(fname, data[, flags])
- converts table to json data & writes to file in world directory.
- parameters:
- fname: File basename without suffix (e.g. "my_config" or "my_mod/my_config").
- data: Table containing data to be exported.
- flags: Table of modifying flags.
- styled: Outputs in a human-readable format if this is set (default: true).
- null_to_table: "null" values will be converted to tables in output (default: false).
Requirements:
- Depends: none
- Optional depends: none
not useful
This mod provides what a mod should implement itself, not depend on a external dependancy. Not to mention it could use mod storage itself. Nice icon for the project though