mirror of
https://github.com/TeTpaAka/quests.git
synced 2024-12-22 08:40:40 +01:00
Basic support for advanced inventories
This commit is contained in:
parent
0ce1a9cd18
commit
6b51cf000b
@ -1,2 +1,3 @@
|
||||
intllib?
|
||||
unified_inventory?
|
||||
inventory_plus?
|
||||
|
2
init.lua
2
init.lua
@ -27,6 +27,8 @@ dofile(minetest.get_modpath("quests") .. "/formspecs.lua")
|
||||
-- support for unified_inventory
|
||||
if (minetest.get_modpath("unified_inventory") ~= nil) then
|
||||
dofile(minetest.get_modpath("quests") .. "/unified_inventory.lua")
|
||||
elseif (minetest.get_modpath("inventory_plus") ~= nil) then
|
||||
dofile(minetest.get_modpath("quests") .. "/inventory_plus.lua")
|
||||
end
|
||||
|
||||
|
||||
|
9
inventory_plus.lua
Normal file
9
inventory_plus.lua
Normal file
@ -0,0 +1,9 @@
|
||||
minetest.register_on_joinplayer(function(player)
|
||||
inventory_plus.register_button(player, "quests")
|
||||
end)
|
||||
|
||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
if (fields.quests) then
|
||||
quests.show_formspec(player:get_player_name())
|
||||
end
|
||||
end)
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
@ -1,6 +1,6 @@
|
||||
unified_inventory.register_button("quests", {
|
||||
type = "image",
|
||||
image = "quests_ui_button.png",
|
||||
image = "inventory_plus_quests.png",
|
||||
tooltip = "Show the questlog",
|
||||
action = function(player)
|
||||
quests.show_formspec(player:get_player_name())
|
||||
|
Loading…
Reference in New Issue
Block a user