From 4782e3404137b3d719250dcb6773577060acd867 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Mon, 12 Dec 2016 01:04:19 +0100 Subject: [PATCH] Rewrite API help --- API.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/API.md b/API.md index 417fefc..0c6037e 100644 --- a/API.md +++ b/API.md @@ -1,7 +1,7 @@ # Minimal API for `doc_identifier` ## Introduction The tool can identify blocks and players natively, and also handles falling nodes -(`__builtin:falling_node`) and dropped items (`__builtin:dropped_item`) on its own. +(`__builtin:falling_node`) and dropped items (`__builtin:item`) on its own. However, the identifier can't “identify” (=open the appropriate entry) custom objects because the mod doesn't know which help entry to open (if there is any). @@ -16,8 +16,9 @@ to an object type: `doc_identifier.register_object`. Registers the object/entity with the internal name `object_name` to the entry `entry_id` in the category `category_id`. It is in the modder's responsibility to make sure that both the category and -entry already exist (use `doc.entry_exists`) at the time of the function call, -otherwise, stability can not be guaranteed. +entry already exist (use `doc.entry_exists` or depend (optionally or not) on the +respective mods) at the time of the function call, otherwise, stability can not be +guaranteed. Returns `nil`. @@ -32,6 +33,6 @@ This enables the tool to be used on the boat object itself. The conditional is a idiom to check for the existence of this mod. ## Note on dependencies -If you just need the aforementioned function from this mod, using only an **optional** +If you just need `doc.sub.identifier.register_object` using only an **optional** dependency for your mod is probably enough. -- 2.11.4.GIT