From bea1d4d950acd87cdf86681c0fb97ab2d9eccf38 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Mon, 12 Dec 2016 23:29:46 +0100 Subject: Add key factoid --- init.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'init.lua') 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) -- cgit v1.2.3