diff options
author | Andreas Haas <liu.gam3@gmail.com> | 2018-03-09 23:34:32 +0100 |
---|---|---|
committer | Andreas Haas <liu.gam3@gmail.com> | 2018-03-15 19:25:06 +0100 |
commit | 700d07cf7cae4e28de107e0c274b27c857d98450 (patch) | |
tree | 0786208c16c9aeec8994e8cb8d2dc25001c26785 /editor | |
parent | aeb1c67b5b55c769256a8ffc2f9d9095d6fc74da (diff) |
Mono: Avoid invalid class names.
Disallow reserved keywords as class names and prefix base class with the Godot
namespace if it's the same as the class name.
Fixes #12483
Diffstat (limited to 'editor')
-rw-r--r-- | editor/script_create_dialog.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/editor/script_create_dialog.cpp b/editor/script_create_dialog.cpp index b893b098ac..e45ad1e78e 100644 --- a/editor/script_create_dialog.cpp +++ b/editor/script_create_dialog.cpp @@ -434,6 +434,13 @@ void ScriptCreateDialog::_path_changed(const String &p_path) { return; } + String path_error = ScriptServer::get_language(language_menu->get_selected())->validate_path(p); + if (path_error != "") { + _msg_path_valid(false, path_error); + _update_dialog(); + return; + } + /* All checks passed */ is_path_valid = true; |