From 00eeeb3eef3d5f57f6d01d2adf655f539c1a3f8e Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Mon, 1 Aug 2016 21:38:19 +0200 Subject: Add support for Unified Inventory --- unified_inventory.lua | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 unified_inventory.lua (limited to 'unified_inventory.lua') diff --git a/unified_inventory.lua b/unified_inventory.lua new file mode 100644 index 0000000..169cdfe --- /dev/null +++ b/unified_inventory.lua @@ -0,0 +1,19 @@ +if minetest.get_modpath("unified_inventory") ~= nil then + local S + if (intllib) then + dofile(minetest.get_modpath("intllib").."/intllib.lua") + S = intllib.Getter(minetest.get_current_modname()) + else + S = function ( s ) return s end + end + + unified_inventory.register_button("awards", { + type = "image", + image = "awards_ui_icon.png", + tooltip = S("Awards"), + action = function(player) + local name = player:get_player_name() + awards.show_to(name, name, nil, false) + end, + }) +end -- cgit v1.2.3