1
0
mirror of https://github.com/TeTpaAka/quests.git synced 2024-12-22 16:50:39 +01:00

initial try to support unified_inventory

Note: there is currently no page. The Button just opens the regular questlog.
This commit is contained in:
TeTpaAka 2015-03-02 22:03:28 +01:00
parent 39f1c08349
commit 0ce1a9cd18
4 changed files with 22 additions and 0 deletions

View File

@ -1 +1,2 @@
intllib?
unified_inventory?

View File

@ -24,6 +24,11 @@ dofile(minetest.get_modpath("quests") .. "/core.lua")
dofile(minetest.get_modpath("quests") .. "/hud.lua")
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")
end
-- write the quests to file
minetest.register_on_shutdown(function()

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

16
unified_inventory.lua Normal file
View File

@ -0,0 +1,16 @@
unified_inventory.register_button("quests", {
type = "image",
image = "quests_ui_button.png",
tooltip = "Show the questlog",
action = function(player)
quests.show_formspec(player:get_player_name())
end
})
--unified_inventory.register_page("quests", {
-- get_formspec = function(player, formspec)
-- local playername = player:get_player_name()
-- local formspec = quests.create_formspec(playername)
-- return {formspec = formspec, draw_inventory=false}
-- end
--})