mirror of
https://gitlab.com/rubenwardy/awards.git
synced 2024-08-20 02:34:06 +02:00
20 lines
490 B
Lua
20 lines
490 B
Lua
|
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
|