Add naming conventions

This commit is contained in:
Wuzzy 2016-08-13 13:41:02 +02:00
parent d6cecb387c
commit d7704c2dea

10
API.md
View File

@ -209,3 +209,13 @@ Returns how many entries have been viewed by a player.
#### Return value
Amount of entries the player has viewed in the specified category. If the
player does not exist, this function returns `nil`.
## Extending this mod (naming conventions)
If you want to extend this mod with your own functionality, it is recommended
that you put all API functions into `doc.sub.<name>`.
As a naming convention, if your mod depends on `doc`, your mod name should also start
with “`doc_`”, like `doc_items`, `doc_minetest_game`, `doc_identifier`.
One mod which uses this convention is `doc_items` which uses the `doc.sub.items`
table.