game-antum/mods/misc/wdata
Jordan Irwin a7804162f8 Update wdata mod to v1.1...
Release: https://github.com/AntumMT/mod-wdata/releases/tag/v1.1
2021-06-15 17:25:44 -07:00
..
LICENSE.txt Add wdata mod at Git commit e339375... 2021-05-28 04:56:19 -07:00
README.md Update wdata mod to v1.1... 2021-06-15 17:25:44 -07:00
TODO.txt Add wdata mod at Git commit e339375... 2021-05-28 04:56:19 -07:00
api.lua Add wdata mod at Git commit e339375... 2021-05-28 04:56:19 -07:00
changelog.txt Add wdata mod at Git commit e339375... 2021-05-28 04:56:19 -07:00
init.lua Add wdata mod at Git commit e339375... 2021-05-28 04:56:19 -07:00
mod.conf Update wdata mod to v1.1... 2021-06-15 17:25:44 -07:00
screenshot.png Update wdata mod to v1.1... 2021-06-15 17:25:44 -07:00

README.md

World Data Manager library for Minetest

Description:

A Minetest 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 & was created before I realized the implementation existed. Some may still find wdata useful as it does allow for customizing sub-directories & filenames.

icon

Licensing:

Usage:

There are two methods:

- wdata.read(fname)
  - reads json data from file in world directory & converts to a table.
  - fname:  File basename without suffix (e.g. "my_config" or "my_mod/my_config").
- wdata.write(fname, data[, styled])
  - converts table to json data & writes to file in world directory.
  - fname:  File basename without suffix (e.g. "my_config" or "my_mod/my_config").
  - data:   Table containing data to be exported.
  - styled: Outputs in a human-readable format if this is set (default: true).

Requirements:

Depends:          none
Optional depends: none