forked from your-land-mirror/yl_speak_up
added more checks for dialog names
This commit is contained in:
parent
7905d9937f
commit
70e1d4144c
@ -171,6 +171,12 @@ yl_speak_up.edit_mode_apply_changes = function(pname, fields)
|
||||
if(dialog.n_dialogs[fields.d_name]) then
|
||||
err_msg = "Sorry. There is already a dialog with a dialog id of "..
|
||||
tostring(fields.d_name).."."
|
||||
elseif(yl_speak_up.is_special_dialog(fields.d_name)) then
|
||||
err_msg = "Sorry. That is a special dialog ID. You cannot use it as "..
|
||||
"a manually set name."
|
||||
elseif(string.sub(fields.d_name, 1, 2) == "d_") then
|
||||
err_msg = "Sorry. Names starting with \"d_\" are not allowed. They "..
|
||||
"may later be needed for new dialogs."
|
||||
end
|
||||
-- TODO: check if the name is allowed (only normal chars, numbers and underscore)
|
||||
if(err_msg) then
|
||||
|
Loading…
Reference in New Issue
Block a user