forked from your-land-mirror/yl_speak_up
moved another function inside exec_actions.lua
This commit is contained in:
parent
49c2c49d6d
commit
3cd6077efd
@ -577,6 +577,26 @@ yl_speak_up.input_fs_action_npc_wants = function(player, formname, fields)
|
||||
"button[2,1.0;1.5,0.9;back_from_error_msg;Back]"})
|
||||
end
|
||||
|
||||
yl_speak_up.get_fs_action_npc_wants = function(player, param)
|
||||
local pname = player:get_player_name()
|
||||
local dialog = yl_speak_up.speak_to[pname].dialog
|
||||
return "size[8.5,8]"..
|
||||
"list[current_player;main;0.2,3.85;8,1;]"..
|
||||
"list[current_player;main;0.2,5.08;8,3;8]"..
|
||||
"button[0.2,0.0;2.0,0.9;back_to_talk;Back to talk]"..
|
||||
"button[4.75,1.6;1.5,0.9;finished_action;Done]"..
|
||||
|
||||
"tooltip[back_to_talk;Click here if you don't know what item the\n"..
|
||||
"NPC wants or don't have the desired item.]"..
|
||||
"tooltip[finished_action;Click here once you have placed the item in\n"..
|
||||
"the waiting slot.]"..
|
||||
"label[1.5,0.7;"..minetest.formspec_escape(dialog.n_npc or "- ? -")..
|
||||
" expects something from you:]"..
|
||||
"list[detached:yl_speak_up_player_"..pname..";npc_wants;3.25,1.5;1,1;]" ..
|
||||
"label[1.5,2.7;Insert the right item and click on \"Done\" to proceed.]"
|
||||
end
|
||||
|
||||
|
||||
|
||||
yl_speak_up.input_fs_action_text_input = function(player, formname, fields)
|
||||
-- back from error_msg? then show the formspec again
|
||||
@ -709,26 +729,6 @@ yl_speak_up.input_fs_action_evaluate = function(player, formname, fields)
|
||||
end
|
||||
|
||||
|
||||
yl_speak_up.get_fs_action_npc_wants = function(player, param)
|
||||
local pname = player:get_player_name()
|
||||
local dialog = yl_speak_up.speak_to[pname].dialog
|
||||
return "size[8.5,8]"..
|
||||
"list[current_player;main;0.2,3.85;8,1;]"..
|
||||
"list[current_player;main;0.2,5.08;8,3;8]"..
|
||||
"button[0.2,0.0;2.0,0.9;back_to_talk;Back to talk]"..
|
||||
"button[4.75,1.6;1.5,0.9;finished_action;Done]"..
|
||||
|
||||
"tooltip[back_to_talk;Click here if you don't know what item the\n"..
|
||||
"NPC wants or don't have the desired item.]"..
|
||||
"tooltip[finished_action;Click here once you have placed the item in\n"..
|
||||
"the waiting slot.]"..
|
||||
"label[1.5,0.7;"..minetest.formspec_escape(dialog.n_npc or "- ? -")..
|
||||
" expects something from you:]"..
|
||||
"list[detached:yl_speak_up_player_"..pname..";npc_wants;3.25,1.5;1,1;]" ..
|
||||
"label[1.5,2.7;Insert the right item and click on \"Done\" to proceed.]"
|
||||
end
|
||||
|
||||
|
||||
yl_speak_up.get_fs_action_evaluate = function(player, param)
|
||||
local pname = player:get_player_name()
|
||||
local dialog = yl_speak_up.speak_to[pname].dialog
|
||||
|
Loading…
Reference in New Issue
Block a user