mirror of
https://gitea.your-land.de/Sokomine/yl_speak_up.git
synced 2025-06-19 05:38:02 +02:00
automaticly add back-button to new dialogs: Let's go back to the start of our talk.
This commit is contained in:
parent
c5587f55c7
commit
9e8cc183fa
@ -236,6 +236,18 @@ yl_speak_up.add_new_dialog = function(dialog, pname, next_id, dialog_text)
|
||||
-- (better ask only when the new dialog is changed)
|
||||
-- table.insert(yl_speak_up.npc_was_changed[ yl_speak_up.edit_mode[pname] ],
|
||||
-- "Dialog "..future_d_id..": New dialog added.")
|
||||
|
||||
-- add an option for going back to the start of the dialog;
|
||||
-- this is an option which the player can delete and change according to needs,
|
||||
-- not a fixed button which may not always fit
|
||||
if(not(dialog_text)) then
|
||||
-- we want to go back to the start from here
|
||||
local target_dialog = yl_speak_up.get_start_dialog_id(dialog)
|
||||
-- this text will be used for the button
|
||||
local option_text = "Let's go back to the start of our talk."
|
||||
-- we just created this dialog - this will be the first option
|
||||
yl_speak_up.add_new_option(dialog, pname, "1", future_d_id, option_text, target_dialog)
|
||||
end
|
||||
return future_d_id
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user