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:
parent
39f1c08349
commit
0ce1a9cd18
@ -1 +1,2 @@
|
|||||||
intllib?
|
intllib?
|
||||||
|
unified_inventory?
|
||||||
|
5
init.lua
5
init.lua
@ -24,6 +24,11 @@ dofile(minetest.get_modpath("quests") .. "/core.lua")
|
|||||||
dofile(minetest.get_modpath("quests") .. "/hud.lua")
|
dofile(minetest.get_modpath("quests") .. "/hud.lua")
|
||||||
dofile(minetest.get_modpath("quests") .. "/formspecs.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
|
-- write the quests to file
|
||||||
minetest.register_on_shutdown(function()
|
minetest.register_on_shutdown(function()
|
||||||
|
BIN
textures/quests_ui_button.png
Normal file
BIN
textures/quests_ui_button.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.3 KiB |
16
unified_inventory.lua
Normal file
16
unified_inventory.lua
Normal 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
|
||||||
|
--})
|
Loading…
Reference in New Issue
Block a user