Finally document some functions ^^

This commit is contained in:
IamPyu 2024-12-22 14:22:39 -06:00
parent 40a66036f4
commit 77cee61fd8

23
API.md
View File

@ -1,3 +1,26 @@
# API Documentation
## Helper Functions
There are many helper functions defined in `mods/CORE/pyutest/util.lua`
There isn't much documentation on these so looking at how they're implemented is
the best way to learn how to use those functions.
## Blocks
There are many functions for creating nodes. Here is a list:
- `PyuTest.make_node`: Wrapper around core.register_node, I wouldn't of made
this if I wasn't so stupid in the early development of this game.
- `PyuTest.make_slab`: Creates slabs.
- `PyuTest.make_stairs`: Creates stairs.
- `PyuTest.make_sign`: Creates signs.
- `PyuTest.make_door`: Creates doors.
- `PyuTest.make_fence`: Creates fences.
- `PyuTest.make_building_blocks`: Originally for making woolen blocks and
carpets but has since become the backbone to creating most of the blocks in
this game. I wouldn't of made this if I wasn't so stupid in the early
development of this game.
These functons automatically use translators under the hood.