Add support for type hints in non-default script editor templates

This also refactors template processing to avoid repetition.

This closes #27074.
This commit is contained in:
Hugo Locurcio 2019-04-05 23:15:12 +02:00
parent cc349336e7
commit 00799fc8c2
No known key found for this signature in database
GPG key ID: 39E8F8BE30B0A49C
3 changed files with 38 additions and 28 deletions

View file

@ -675,14 +675,14 @@ bool EditorSettings::_save_text_editor_theme(String p_file) {
static Dictionary _get_builtin_script_templates() {
Dictionary templates;
//No Comments
// No Comments
templates["no_comments.gd"] =
"extends %BASE%\n"
"\n"
"func _ready():\n"
"func _ready()%VOID_RETURN%:\n"
"%TS%pass\n";
//Empty
// Empty
templates["empty.gd"] =
"extends %BASE%"
"\n"