diff options
author | Wuzzy <almikes@aol.com> | 2016-07-30 02:14:24 +0200 |
---|---|---|
committer | Wuzzy <almikes@aol.com> | 2016-07-30 02:14:24 +0200 |
commit | d48951e1be7fa5dcc459164394f668adf774d4b4 (patch) | |
tree | 4d4aad1e81d67b894770bb94a351b912241bede2 | |
parent | 36fe4a1faeb5eafded55324c4981098d2a045106 (diff) |
Add button for Unified Inventory
-rw-r--r-- | depends.txt | 1 | ||||
-rw-r--r-- | init.lua | 15 | ||||
-rw-r--r-- | textures/doc_button_icon_hires.png | bin | 0 -> 1072 bytes |
3 files changed, 15 insertions, 1 deletions
diff --git a/depends.txt b/depends.txt new file mode 100644 index 0000000..20b7c42 --- /dev/null +++ b/depends.txt @@ -0,0 +1 @@ +unified_inventory? @@ -284,7 +284,7 @@ minetest.register_on_player_receive_fields(doc.process_form) minetest.register_chatcommand("doc", { params = "", - description = "Show in-game documentation system.", + description = "Open documentation system.", privs = {}, func = function(playername, param) doc.show_doc(playername) @@ -299,3 +299,16 @@ end) minetest.register_on_leaveplayer(function(player) doc.data.players[player:get_player_name()] = nil end) + +---[[ Add buttons for inventory mods ]] +-- Unified Inventory +if minetest.get_modpath("unified_inventory") ~= nil then + unified_inventory.register_button("doc", { + type = "image", + image = "doc_button_icon_hires.png", + tooltip = "Documentation System", + action = function(player) + doc.show_doc(player:get_player_name()) + end, + }) +end diff --git a/textures/doc_button_icon_hires.png b/textures/doc_button_icon_hires.png Binary files differnew file mode 100644 index 0000000..ebc0918 --- /dev/null +++ b/textures/doc_button_icon_hires.png |