From 57403c7a8155dd8c8fa4980cd31cbe68bb956508 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Fri, 18 Nov 2016 00:01:32 +0100 Subject: [PATCH] Use get_group_name from doc_items --- init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index a804d44..1f31447 100644 --- a/init.lua +++ b/init.lua @@ -2,7 +2,7 @@ local S if (minetest.get_modpath("intllib")) then S = intllib.Getter() else - S = function ( s ) return s end + S = function(s,a,...)a={a,...}return s:gsub("@(%d+)",function(n)return a[tonumber(n)]end)end end minetest.register_tool("wateringcan:wateringcan_water", { @@ -70,7 +70,7 @@ minetest.register_tool("wateringcan:wateringcan_empty", { description = S("Empty watering can"), _doc_items_entry_name = S("Watering can"), _doc_items_longdesc = S("Watering cans are used to collect a small amount of water in order to pour it on dry blocks. One filled watering can can be used 24 times, after which it has to be refilled. Watering cans don't wear out."), - _doc_items_usagehelp = S("Rightclick on water (or any other block belonging to the “Water” group) to fill or refill the watering can. Rightclick with the filled can on an appropriate block (or a plant above it) to wetten it. Soil, desert sand soil, and other blocks capable of becoming wet can be wettened. The tool wear indicator of the watering can indicates the amount of water left."), + _doc_items_usagehelp = S("Rightclick on water (or any other block belonging to the “@1” group) to fill or refill the watering can. Rightclick with the filled can on an appropriate block (or a plant above it) to wetten it. Soil, desert sand soil, and other blocks capable of becoming wet can be wettened. The tool wear indicator of the watering can indicates the amount of water left.", doc.sub.items.get_group_name("water")), inventory_image = "wateringcan_wateringcan_empty.png", wield_image = "wateringcan_wateringcan_wield.png", liquids_pointable = true,