From d7704c2deaa3cd5d05230dbbedc373ded7bf660a Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sat, 13 Aug 2016 13:41:02 +0200 Subject: Add naming conventions --- API.md | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'API.md') diff --git a/API.md b/API.md index 91dfe87..8faf520 100644 --- a/API.md +++ b/API.md @@ -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.`. +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. -- cgit v1.2.3