mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-11-05 18:10:26 +01:00
49 lines
1.6 KiB
Lua
Executable File
49 lines
1.6 KiB
Lua
Executable File
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", {
|
|
get_formspec = function(player)
|
|
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", {
|
|
get_formspec = function(player)
|
|
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", {
|
|
get_formspec = function(player)
|
|
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],
|
|
quests.formspec_lists[playername].taskid, true)
|
|
return {formspec = formspec, draw_inventory = false }
|
|
end
|
|
})
|