export_to_simple_dialogs: use d_name where possible

This commit is contained in:
Sokomine 2024-03-22 17:26:28 +01:00
parent 30dfa9c378
commit ebfc068694

View File

@ -27,7 +27,7 @@ yl_speak_up.export_to_simple_dialogs_language = function(dialog, n_id)
for i, d_id in ipairs(d_liste) do
table.insert(tmp, "===")
-- TODO: use labels here when available
table.insert(tmp, tostring(d_id))
table.insert(tmp, tostring(yl_speak_up.d_id_to_d_name(dialog, d_id)))
table.insert(tmp, "\n")
-- :, > and = are not allowed as line start in simple dialogs
-- just add a leading blank so that any :, > and = at the start are covered
@ -44,7 +44,7 @@ yl_speak_up.export_to_simple_dialogs_language = function(dialog, n_id)
end
end
table.insert(tmp, ">")
table.insert(tmp, target_dialog or "d_1")
table.insert(tmp, yl_speak_up.d_id_to_d_name(dialog, target_dialog or "d_1"))
table.insert(tmp, ":")
table.insert(tmp, o_data.o_text_when_prerequisites_met)
table.insert(tmp, "\n")