summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/init.lua b/init.lua
index 06ec80e..9afbff3 100644
--- a/init.lua
+++ b/init.lua
@@ -232,6 +232,23 @@ local function f_spreading_dirt_type(itemstring, def)
end
end
+local function f_hoe_soil(itemstring, def)
+ if def.soil then
+ local name, node
+ nodedef = minetest.registered_nodes[def.soil.dry]
+ if nodedef then
+ name = nodedef.description
+ end
+ if name then
+ return S("This block can be turned into @1 with a hoe.", name)
+ else
+ return S("This block can be cultivated by a hoe.")
+ end
+ else
+ return ""
+ end
+end
+
--[[ Node defines skeleton key and key callbacks which probably implies that
it can be unlocked by keys ]]
local function f_key(itemstring, def)
@@ -243,6 +260,7 @@ local function f_key(itemstring, def)
end
doc.sub.items.register_factoid("nodes", "use", f_key)
+doc.sub.items.register_factoid("nodes", "use", f_hoe_soil)
doc.sub.items.register_factoid("nodes", "groups", f_cools_lava)
doc.sub.items.register_factoid("nodes", "groups", f_fire)
doc.sub.items.register_factoid("nodes", "groups", f_flora)