summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
authorWuzzy <almikes@aol.com>2016-12-12 23:29:46 +0100
committerWuzzy <almikes@aol.com>2016-12-12 23:29:46 +0100
commitbea1d4d950acd87cdf86681c0fb97ab2d9eccf38 (patch)
tree4c1e8138a696189157c3765c483e8f54b524ff43 /init.lua
parent9a416d4c9a5a75ffba8bd06abecab9982cd08e5d (diff)
Add key factoid
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/init.lua b/init.lua
index 9d17019..28919bc 100644
--- a/init.lua
+++ b/init.lua
@@ -213,6 +213,17 @@ local function f_leafdecay(itemstring, def)
return formstring
end
+--[[ Node defines skeleton key and key callbacks which probably implies that
+it can be unlocked by keys ]]
+local function f_key(itemstring, def)
+ if def.on_key_use and def.on_skeleton_key_use then
+ return S("This block is compatible with keys.")
+ else
+ return ""
+ end
+end
+
+doc.sub.items.register_factoid("nodes", "use", f_key)
doc.sub.items.register_factoid("nodes", "groups", f_fire)
doc.sub.items.register_factoid("nodes", "groups", f_flora)
doc.sub.items.register_factoid("nodes", "groups", f_leafdecay)