hide autoanswer options if their preconditions are not fulfilled

This commit is contained in:
Sokomine 2022-09-15 23:21:10 +02:00
parent 5a4f137b65
commit 608935277f
2 changed files with 6 additions and 2 deletions

View File

@ -230,8 +230,8 @@ yl_speak_up.get_fs_edit_option_dialog = function(player, n_id, d_id, o_id, calle
"container_end[]"
else
answer_text = answer_text..
"label[1.2,0.8;This option will be selected automaticly if all prerequirements are "..
"fullfilled.]"..
"label[1.2,0.8;This option will not be shown but will be selected automaticly if all "..
"prerequirements are fullfilled.]"..
"label[1.2,1.4;The remaining options of this dialog will in this case not be evaluated.]"..
"label[1.2,2.0;The NPC will proceed as if this dialog was choosen manually.]"..
"label[1.2,2.6;This is useful for offering a diffrent start dialog depending on the "..

View File

@ -411,6 +411,10 @@ yl_speak_up.get_fs_talkdialog_line_in_normal_mode = function(
elseif(sb_v.o_hide_when_prerequisites_not_met == "true") then
-- show nothing; t_alt remains nil
t = nil
-- precondition not fulfilled, and autoanswer active? Then hide this option.
elseif(sb_v.o_autoanswer) then
-- show nothing; t_alt remains nil
t = nil
-- precondition not fulfilled? the option shall be greyed out
-- default to greyed out (this option cannot be selected)
elseif(sb_v.o_grey_when_prerequisites_not_met == "true") then