forked from mtcontrib/awards
Add support for Unified Inventory
This commit is contained in:
parent
5dec2fd60b
commit
00eeeb3eef
@ -1 +1,2 @@
|
|||||||
intllib?
|
intllib?
|
||||||
|
unified_inventory?
|
||||||
|
1
init.lua
1
init.lua
@ -25,6 +25,7 @@ end
|
|||||||
|
|
||||||
dofile(minetest.get_modpath("awards").."/api.lua")
|
dofile(minetest.get_modpath("awards").."/api.lua")
|
||||||
dofile(minetest.get_modpath("awards").."/chat_commands.lua")
|
dofile(minetest.get_modpath("awards").."/chat_commands.lua")
|
||||||
|
dofile(minetest.get_modpath("awards").."/unified_inventory.lua")
|
||||||
dofile(minetest.get_modpath("awards").."/triggers.lua")
|
dofile(minetest.get_modpath("awards").."/triggers.lua")
|
||||||
awards.set_intllib(S)
|
awards.set_intllib(S)
|
||||||
|
|
||||||
|
@ -59,3 +59,4 @@ Deep Down =
|
|||||||
Die below -10000 =
|
Die below -10000 =
|
||||||
In space, no one can hear you scream =
|
In space, no one can hear you scream =
|
||||||
Die above 10000 =
|
Die above 10000 =
|
||||||
|
Awards =
|
||||||
|
BIN
textures/awards_ui_icon.png
Normal file
BIN
textures/awards_ui_icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.4 KiB |
19
unified_inventory.lua
Normal file
19
unified_inventory.lua
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user