From 8a13dbe997460f1e1ab244767b58bfb2aea0ccb2 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sun, 30 Oct 2016 19:58:09 +0100 Subject: [PATCH] Use new doc_items interface --- init.lua | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/init.lua b/init.lua index f86b5d0..44bf958 100644 --- a/init.lua +++ b/init.lua @@ -145,6 +145,8 @@ end minetest.register_tool("doc_identifier:identifier_solid", { description = S("Lookup tool"), + x_doc_items_longdesc = S("This useful little helper can be used to quickly learn more about about one's closer environment. It identifies and analyzes blocks, items and other things and it shows extensive information about the thing on which it is used."), + x_doc_items_usagehelp = S("Punch any block, item or other thing about you wish to learn more about. This will open up the Documentation System entry of this particular item. The tool comes in two modes which are changed by a rightclick. In liquid mode (blue) this tool points to liquids as well while in solid mode (red) this is not the case. Liquid mode is required if you want to identify a liquid."), tool_capabilities = {}, range = 10, wield_image = "doc_identifier_identifier.png", @@ -156,9 +158,10 @@ minetest.register_tool("doc_identifier:identifier_solid", { }) minetest.register_tool("doc_identifier:identifier_liquid", { description = S("Lookup tool"), + x_doc_items_create_entry = false, tool_capabilities = {}, range = 10, - groups = { not_in_creative_inventory = 1, not_in_doc = 1 }, + groups = { not_in_creative_inventory = 1, }, wield_image = "doc_identifier_identifier_liquid.png", inventory_image = "doc_identifier_identifier_liquid.png", liquids_pointable = true, @@ -184,9 +187,4 @@ end minetest.register_alias("doc_identifier:identifier", "doc_identifier:identifier_solid") --- Add documentation -doc.sub.items.set_items_longdesc( - { ["doc_identifier:identifier_solid"] = S("This useful little helper can be used to quickly learn more about about one's closer environment. It identifies and analyzes blocks, items and other things and it shows extensive information about the thing on which it is used.") }) -doc.sub.items.set_items_usagehelp( - { ["doc_identifier:identifier_solid"] = S("Punch any block, item or other thing about you wish to learn more about. This will open up the Documentation System entry of this particular item. The tool comes in two modes which are changed by a rightclick. In liquid mode (blue) this tool points to liquids as well while in solid mode (red) this is not the case. Liquid mode is required if you want to identify a liquid.") }) doc.add_entry_alias("tools", "doc_identifier:identifier_solid", "doc_identifier:identifier_liquid")