minor bugfixes

This commit is contained in:
Sokomine 2022-05-04 14:13:18 +02:00
parent 5b0338fabc
commit 9260989bed
2 changed files with 7 additions and 1 deletions

View File

@ -160,6 +160,12 @@ yl_speak_up.show_fs_decorated = function(pname, edit_mode, h,
-- which NPC is the player talking to?
local n_id = yl_speak_up.speak_to[pname].n_id
local dialog = yl_speak_up.speak_to[pname].dialog
if(n_id and dialog and not(dialog.n_npc)) then
dialog.n_npc = n_id
end
if(n_id and dialog and not(dialog.n_description)) then
dialog.n_description = "- no description -"
end
-- do we have all the necessary data?
if(not(n_id) or not(dialog) or not(dialog.n_npc)) then
return "size[6,2]"..

View File

@ -372,7 +372,7 @@ yl_speak_up.get_fs_edit_option_dialog = function(player, n_id, d_id, o_id, calle
-- the first entry will be "New dialog"
local n = 1
for k, v in pairs(dialog.n_dialogs) do
dialog_list = dialog_list .. "," .. minetest.formspec_escape(v.d_id)
dialog_list = dialog_list .. "," .. minetest.formspec_escape(v.d_id or "?")
-- which one is the current dialog?
n = n + 1
if(v.d_id == target_dialog) then