fixed bug in update_dialog_option regarding automaticly selected and random options
This commit is contained in:
parent
7c801291f9
commit
d5b5832b02
@ -215,8 +215,8 @@ yl_speak_up.update_dialog = function(log, dialog, dialog_name, dialog_text)
|
|||||||
|
|
||||||
-- the random option is set for the dialog entire; we will have to process the individual
|
-- the random option is set for the dialog entire; we will have to process the individual
|
||||||
-- options in order to find out if this dialog is o_random; the first option that is sets
|
-- options in order to find out if this dialog is o_random; the first option that is sets
|
||||||
-- it for the dialog
|
-- it for the dialog -> keep the old value
|
||||||
d_data.o_random = nil
|
--d_data.o_random = nil
|
||||||
|
|
||||||
-- there may be existing options that won't get updated; deal with them:
|
-- there may be existing options that won't get updated; deal with them:
|
||||||
-- remember which options the dialog has and which sort order they had
|
-- remember which options the dialog has and which sort order they had
|
||||||
@ -603,11 +603,8 @@ yl_speak_up.update_dialog_option = function(log, dialog, dialog_name, option_nam
|
|||||||
local d_data = dialog.n_dialogs[d_id]
|
local d_data = dialog.n_dialogs[d_id]
|
||||||
-- is this option selected randomly?
|
-- is this option selected randomly?
|
||||||
if( mode == 2 and not(d_data.o_random)) then
|
if( mode == 2 and not(d_data.o_random)) then
|
||||||
|
table.insert(log, log_str.."Changed DIALOG \""..tostring(d_id).."\" to RANDOMLY SELECTED.")
|
||||||
d_data.o_random = 1
|
d_data.o_random = 1
|
||||||
table.insert(log, log_str.."Changed DIALOG \""..tostring(d_id).."\" to RANDOMLY SELECTED.")
|
|
||||||
elseif(mode ~= 2 and d_data.o_random) then
|
|
||||||
d_data.o_random = nil
|
|
||||||
table.insert(log, log_str.."Changed DIALOG \""..tostring(d_id).."\" to RANDOMLY SELECTED.")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- is this option selected automaticly if all preconditions are met?
|
-- is this option selected automaticly if all preconditions are met?
|
||||||
@ -615,7 +612,7 @@ yl_speak_up.update_dialog_option = function(log, dialog, dialog_name, option_nam
|
|||||||
o_data.o_autoanswer = 1
|
o_data.o_autoanswer = 1
|
||||||
table.insert(log, log_str.."Changed option \""..tostring(o_id).."\" to AUTOMATICLY SELECTED.")
|
table.insert(log, log_str.."Changed option \""..tostring(o_id).."\" to AUTOMATICLY SELECTED.")
|
||||||
-- mode is 0 - that means everything is normal for this option
|
-- mode is 0 - that means everything is normal for this option
|
||||||
elseif(o_data.o_autoanswer) then
|
elseif(mode ~= 1 and o_data.o_autoanswer) then
|
||||||
o_data.o_autoanswer = nil
|
o_data.o_autoanswer = nil
|
||||||
table.insert(log, log_str.."Removed AUTOMATICLY SELECTED from option \""..tostring(o_id).."\".")
|
table.insert(log, log_str.."Removed AUTOMATICLY SELECTED from option \""..tostring(o_id).."\".")
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user