yl_speak_up/fs_quest_gui.lua
2022-11-02 16:45:13 +01:00

30 lines
872 B
Lua

yl_speak_up.input_quest_gui = function(player, formname, fields)
-- this return value is necessary for custom actions
local ret = {quit = true}
local pname = player:get_player_name()
if(fields and fields.back_from_msg) then
yl_speak_up.show_fs(player, "quest_gui")
return ret
end
-- new variables have to be added (and deleted) somewhere after all
if(fields.manage_variables) then
-- remember which formspec we are comming from
yl_speak_up.speak_to[pname][ "working_at" ] = "quest_gui"
yl_speak_up.show_fs(player, "manage_variables")
return ret
end
-- the calling NPC shall no longer do anything
return ret
end
yl_speak_up.get_fs_quest_gui = function(player, param)
local pname = player:get_player_name()
return "size[10,2]"..
"label[0,0.5;Hi. This is a quest admin gui.]"..
"button[0.2,1.0;4.0,0.6;manage_variables;Manage variables]"
end