master #4

Merged
AliasAlreadyTaken merged 56 commits from master into yl_stable 2025-03-08 04:12:44 +01:00
Showing only changes of commit 000978ef50 - Show all commits

View File

@ -165,9 +165,15 @@ yl_speak_up.update_dialog = function(log, dialog, dialog_name, dialog_text)
end
local is_new = false
if(not(d_id)) then
local next_id = nil
-- if dialog_name matches the d_<nr> pattern but d_<nr> does not exist,
-- then try to create *that* dialog
if(dialog_name and string.sub(dialog_name, 1, 2) == "d_") then
next_id = tonumber(string.sub(dialog_name, 3))
end
-- pname is nil - thus no logging and no adding of a back to start option
-- next_id is also nil - so just add a new dialog
d_id = yl_speak_up.add_new_dialog(dialog, nil, nil, dialog_text)
-- next_id is also usually nil - so just add a new dialog
d_id = yl_speak_up.add_new_dialog(dialog, nil, next_id, dialog_text)
if(not(d_id)) then
-- the creation may have failed (i.e. dialog not beeing a dialog,
-- or too many dialogs in dialog already)