Skip to content

Commit 813dfa8

Browse files
committed
Initial commit
0 parents  commit 813dfa8

File tree

3 files changed

+2313
-0
lines changed

3 files changed

+2313
-0
lines changed

LICENSE

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Type definitions for Minetest API
2+
3+
Copyright 2021 Seth Traverse <https://github.com/grapereader>
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of
6+
this software and associated documentation files (the "Software"), to deal in
7+
the Software without restriction, including without limitation the rights to
8+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9+
the Software, and to permit persons to whom the Software is furnished to do so,
10+
subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Minetest API Types
2+
3+
This project adds type definitions for the [Minetest Modding API](https://github.com/minetest/minetest/blob/master/doc/lua_api.txt)
4+
5+
Requires an IDE with [EmmyLua](https://github.com/EmmyLua) support (or compatible).
6+
7+
## Setup
8+
9+
For the most part, it should be sufficient to clone this repository or copy defns.lua into a project workspace.
10+
11+
This project was written using [lua-language-server](https://github.com/sumneko/lua-language-server) on VSCode. Some additional settings are required to make this work. In VSCode settings, add the following:
12+
```
13+
{
14+
"Lua.diagnostics.globals": ["minetest", "vector", "dump", "dump2"]
15+
}
16+
```
17+
18+
## Contributing
19+
20+
PRs are welcome. While most of the API is covered, there are areas with incomplete support and the minetest API has many edge cases. The more we can document and restrict with type definitions, the safer and less error prone mod development becomes.
21+
22+
Priorities:
23+
24+
- Documentation comments for most functions / fields
25+
- Bug fixes
26+
- Correct types for remaining "any" placeholders
27+
- README updates / setup instructions for other IDEs

0 commit comments

Comments
 (0)