mirror of
https://gitea.your-land.de/Sokomine/yl_speak_up.git
synced 2025-06-16 13:48:06 +02:00
added yl_speak_up.count_dialogs function
This commit is contained in:
parent
ebfc068694
commit
fe8755a260
@ -783,3 +783,20 @@ yl_speak_up.get_sorted_dialog_name_list = function(dialog)
|
||||
end
|
||||
return liste
|
||||
end
|
||||
|
||||
|
||||
-- how many own (not special, not generic) dialogs does the NPC have?
|
||||
yl_speak_up.count_dialogs = function(dialog)
|
||||
local count = 0
|
||||
if(not(dialog) or not(dialog.n_dialogs)) then
|
||||
return 0
|
||||
end
|
||||
for d_id, v in pairs(dialog.n_dialogs) do
|
||||
if(d_id
|
||||
and not(yl_speak_up.is_special_dialog(d_id)
|
||||
and not(dialog.n_dialogs[d_id].is_generic))) then
|
||||
count = count + 1
|
||||
end
|
||||
end
|
||||
return count
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user