summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
authorWuzzy <almikes@aol.com>2016-12-28 14:10:21 +0100
committerWuzzy <almikes@aol.com>2016-12-28 14:10:21 +0100
commitc57e5c05585d989759726a8bf1182df0c5d5e307 (patch)
treeffc8b8c45e17049511c7d52c81c97c9d932544e8 /init.lua
parent010cabddce13d1be23d40a8f8996b6c15a38b949 (diff)
Add Inventory++ support
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua11
1 files changed, 10 insertions, 1 deletions
diff --git a/init.lua b/init.lua
index 2c0e9b4..2868ea6 100644
--- a/init.lua
+++ b/init.lua
@@ -1147,6 +1147,11 @@ function doc.process_form(player,formname,fields)
local formspec = doc.formspec_core(3)..doc.formspec_entry(cid, eid, playername)
minetest.show_formspec(playername, "doc:entry", formspec)
end
+ else
+ if fields["doc_inventory_plus"] and minetest.get_modpath("inventory_plus") then
+ doc.show_doc(playername)
+ return
+ end
end
end
@@ -1209,6 +1214,11 @@ minetest.register_on_joinplayer(function(player)
playerdata.stored_data.revealed_count[cid] = rc
end
end
+
+ -- Add button for Inventory++
+ if minetest.get_modpath("inventory_plus") ~= nil then
+ inventory_plus.register_button(player, "doc_inventory_plus", S("Help"))
+ end
end)
---[[ Add buttons for inventory mods ]]
@@ -1237,7 +1247,6 @@ if minetest.get_modpath("sfinv_buttons") ~= nil then
end
-
minetest.register_privilege("help_reveal", {
description = S("Allows you to reveal all hidden help entries with /help_reveal"),
give_to_singleplayer = false