Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/appgurueu/modlib
Modular Multipurpose Minetest Modding Library
https://github.com/appgurueu/modlib
b3d configuration data-structures lua math minetest mod serialization
Last synced: 3 months ago
JSON representation
Modular Multipurpose Minetest Modding Library
- Host: GitHub
- URL: https://github.com/appgurueu/modlib
- Owner: appgurueu
- License: mit
- Created: 2019-03-19T16:42:06.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-09-07T15:25:14.000Z (over 1 year ago)
- Last Synced: 2024-09-27T08:42:44.599Z (3 months ago)
- Topics: b3d, configuration, data-structures, lua, math, minetest, mod, serialization
- Language: Lua
- Homepage:
- Size: 656 KB
- Stars: 22
- Watchers: 3
- Forks: 10
- Open Issues: 2
-
Metadata Files:
- Readme: Readme.md
- License: License.txt
Awesome Lists containing this project
README
# ![Logo](logo.svg) Modding Library (`modlib`)
Multipurpose Minetest Modding Library
## At a glance
No dependencies. Licensed under the MIT License. Written by Lars Mueller aka LMD or appguru(eu). Requires Lua 5.1 / LuaJIT.
### Acknowledgement
* [luk3yx](https://github.com/luk3yx): Various suggestions, bug reports and fixes
* [grorp](https://github.com/grorp) (Gregor Parzefall): [Bug reports & proposed fixes for node box code](https://github.com/appgurueu/modlib/pull/8)
* [NobWow](https://github.com/NobWow/): [Another bugfix](https://github.com/appgurueu/modlib/pull/7)### Principles
* Game-agnostic: Modlib aims to provide nothing game-specific;
* Minimal invasiveness: Modlib should not disrupt other mods;
even at the expense of syntactic sugar, changes to the global
environment - apart from the addition of the modlib scope - are forbidden
* Architecture: Modlib is organized hierarchically
* Performance: Modlib tries to not compromise performance for convenience; modlib loads lazily## Tests
The tests are located in a different repo, [`modlib_test`](https://github.com/appgurueu/modlib_test), as they are quite heavy due to testing the PNG reader using PngSuite. Reading the tests for examples of API usage is recommended.
## API
(Incomplete) documentation resides in the `doc` folder; you'll have to dive into the code for everything else.
The mod namespace is `modlib`, containing all modules which in turn contain variables & functions.
Modules are lazily loaded by indexing the `modlib` table. Do `_ = modlib.` to avoid file load spikes at run time.
Localizing modules (`local = modlib.`) is recommended.