allowed precondition "property" for generic npc

This commit is contained in:
Sokomine 2022-07-09 21:35:46 +02:00
parent 9bbd3e943c
commit 48c722c943

View File

@ -146,12 +146,13 @@ yl_speak_up.check_and_add_as_generic_dialog = function(dialog, n_id)
if(prereq) then
for p_id, p in pairs(prereq) do
if(p.p_type ~= "state" and p.p_type ~= "player_inv" and p.p_type ~= "custom"
and p.p_type ~= "property"
and p.p_type ~= "true" and p.p_type ~= "false") then
return "Precondition "..tostring(p_id)..
" of option "..tostring(one_option)..
" of dialog "..tostring(d_id)..
" has unsupported type: "..tostring(p.p_type)..
". Supported types: state, player_inv and custom."
". Supported types: state, property, player_inv and custom."
end
end
end
@ -176,6 +177,7 @@ yl_speak_up.check_and_add_as_generic_dialog = function(dialog, n_id)
and p.p_type ~= "player_offered_item"
and p.p_type ~= "function"
and p.p_type ~= "custom"
and p.p_type ~= "property"
-- depends on the preconditions of another option
and p.p_type ~= "other"
and p.p_type ~= "true"