2015-07-22 00:04:54 +02:00
|
|
|
unified_inventory.register_button("quests", {
|
|
|
|
type = "image",
|
|
|
|
image = "inventory_plus_quests.png",
|
|
|
|
tooltip = "Show the questlog",
|
|
|
|
-- action = function(player)
|
|
|
|
-- quests.show_formspec(player:get_player_name())
|
|
|
|
-- end
|
|
|
|
})
|
|
|
|
|
|
|
|
unified_inventory.register_page("quests", {
|
2015-07-23 20:40:36 +02:00
|
|
|
get_formspec = function(player)
|
2015-07-22 00:04:54 +02:00
|
|
|
local playername = player:get_player_name()
|
|
|
|
local formspec = quests.create_formspec(playername, "1", true)
|
|
|
|
return {formspec = formspec, draw_inventory=false}
|
|
|
|
end
|
|
|
|
})
|
|
|
|
|
|
|
|
unified_inventory.register_page("quests_successfull", {
|
2015-07-23 20:40:36 +02:00
|
|
|
get_formspec = function(player)
|
2015-07-22 00:04:54 +02:00
|
|
|
local playername = player:get_player_name()
|
|
|
|
local formspec = quests.create_formspec(playername, "2", true)
|
|
|
|
return {formspec = formspec, draw_inventory=false}
|
|
|
|
end
|
|
|
|
})
|
|
|
|
|
|
|
|
unified_inventory.register_page("quests_failed", {
|
2015-07-23 20:40:36 +02:00
|
|
|
get_formspec = function(player)
|
2015-07-22 00:04:54 +02:00
|
|
|
local playername = player:get_player_name()
|
|
|
|
local formspec = quests.create_formspec(playername, "3", true)
|
|
|
|
return {formspec = formspec, draw_inventory=false}
|
|
|
|
end
|
|
|
|
})
|
|
|
|
|
|
|
|
unified_inventory.register_page("quests_config", {
|
|
|
|
get_formspec = function(player)
|
|
|
|
local playername = player:get_player_name()
|
|
|
|
local formspec = quests.create_config(playername, true)
|
|
|
|
return {formspec = formspec, draw_inventory = false }
|
|
|
|
end
|
|
|
|
})
|
|
|
|
unified_inventory.register_page("quests_info", {
|
|
|
|
get_formspec = function(player)
|
|
|
|
local playername = player:get_player_name()
|
|
|
|
local formspec = quests.create_info(playername, quests.formspec_lists[playername].list[quests.formspec_lists[playername].id], true)
|
|
|
|
return {formspec = formspec, draw_inventory = false }
|
|
|
|
end
|
|
|
|
})
|