build | ||
doc | ||
minetest | ||
persistence | ||
web | ||
b3d.lua | ||
binary.lua | ||
bluon.lua | ||
file.lua | ||
func.lua | ||
hashheap.lua | ||
hashlist.lua | ||
heap.lua | ||
init.lua | ||
iterator.lua | ||
json.lua | ||
kdtree.lua | ||
License.txt | ||
logo.svg | ||
luon.lua | ||
math.lua | ||
minetest.lua | ||
mod.conf | ||
persistence.lua | ||
quaternion.lua | ||
ranked_set.lua | ||
Readme.md | ||
schema.lua | ||
table.lua | ||
text.lua | ||
trie.lua | ||
utf8.lua | ||
vararg.lua | ||
vector.lua | ||
web.lua |
Modding Library (modlib
)
Multipurpose Minetest Modding Library
About
No dependencies. Licensed under the MIT License. Written by Lars Mueller aka LMD or appguru(eu). Notable contributions by luk3yx in the form of suggestions, bug reports and fixes. Another bugfix by NobWow.
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
, 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.<module>
to avoid file load spikes at run time.
Localizing modules (local <module> = modlib.<module>
) is recommended.