Add naming conventions
This commit is contained in:
parent
d6cecb387c
commit
d7704c2dea
10
API.md
10
API.md
@ -209,3 +209,13 @@ Returns how many entries have been viewed by a player.
|
|||||||
#### Return value
|
#### Return value
|
||||||
Amount of entries the player has viewed in the specified category. If the
|
Amount of entries the player has viewed in the specified category. If the
|
||||||
player does not exist, this function returns `nil`.
|
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.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user