forked from Sokomine/yl_speak_up
added yl_speak_up.check_if_dialog_has_option for easier check if option is available
This commit is contained in:
parent
4993656940
commit
2d2afdfb26
@ -715,6 +715,17 @@ yl_speak_up.set_muted = function(p_name, obj, set_muted)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
-- checks if dialog contains d_id and o_id
|
||||
yl_speak_up.check_if_dialog_has_option = function(dialog, d_id, o_id)
|
||||
return (dialog and d_id and o_id
|
||||
and dialog.n_dialogs
|
||||
and dialog.n_dialogs[d_id]
|
||||
and dialog.n_dialogs[d_id].d_options
|
||||
and dialog.n_dialogs[d_id].d_options[o_id])
|
||||
end
|
||||
|
||||
|
||||
-- has the player the right privs?
|
||||
-- this is used for the "I am your master" talk based configuration; *NOT* for the staffs!
|
||||
yl_speak_up.may_edit_npc = function(player, n_id)
|
||||
|
Loading…
Reference in New Issue
Block a user