diff options
author | Wuzzy <almikes@aol.com> | 2016-12-07 19:14:38 +0100 |
---|---|---|
committer | Wuzzy <almikes@aol.com> | 2016-12-07 19:14:38 +0100 |
commit | b059821156b512c3efec22e39b2551656d41d32d (patch) | |
tree | 3c8f590971378fddeaece8bb2e965cd81a5ed74c /init.lua | |
parent | 2b0c044b13723b24127ec7319a389c392eb091c5 (diff) |
Add sfinv_buttons support
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 20 |
1 files changed, 17 insertions, 3 deletions
@@ -1197,18 +1197,32 @@ minetest.register_on_leaveplayer(function(player) end) ---[[ Add buttons for inventory mods ]] +local button_action = function(player) + doc.show_doc(player:get_player_name()) +end + -- Unified Inventory if minetest.get_modpath("unified_inventory") ~= nil then unified_inventory.register_button("doc", { type = "image", image = "doc_button_icon_hires.png", tooltip = S("Documentation System"), - action = function(player) - doc.show_doc(player:get_player_name()) - end, + action = button_action, }) end +-- sfinv_buttons +if minetest.get_modpath("sfinv_buttons") ~= nil then + sfinv_buttons.register_button("doc", { + image = "doc_button_icon_lores.png", + tooltip = S("Collection of help texts"), + title = S("Documentation System"), + action = button_action, + }) +end + + + minetest.register_privilege("doc_reveal", { description = S("Allows you to reveal all hidden help entries with /doc_reveal"), give_to_singleplayer = false |