Skip to content

Commit

Permalink
Merge pull request #33673 from YeldhamDev/script_templates_lines_style
Browse files Browse the repository at this point in the history
Make the script templates' blank lines conform with the official style guide
  • Loading branch information
akien-mga authored Nov 19, 2019
2 parents 511de4c + 7ecaff5 commit 8450658
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions editor/editor_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,7 @@ static Dictionary _get_builtin_script_templates() {
templates["no_comments.gd"] =
"extends %BASE%\n"
"\n"
"\n"
"func _ready()%VOID_RETURN%:\n"
"%TS%pass\n";

Expand Down
3 changes: 3 additions & 0 deletions modules/gdscript/gdscript_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,18 @@ String GDScriptLanguage::_get_processed_template(const String &p_template, const

Ref<Script> GDScriptLanguage::get_template(const String &p_class_name, const String &p_base_class_name) const {
String _template = "extends %BASE%\n"
"\n"
"\n"
"# Declare member variables here. Examples:\n"
"# var a%INT_TYPE% = 2\n"
"# var b%STRING_TYPE% = \"text\"\n"
"\n"
"\n"
"# Called when the node enters the scene tree for the first time.\n"
"func _ready()%VOID_RETURN%:\n"
"%TS%pass # Replace with function body.\n"
"\n"
"\n"
"# Called every frame. 'delta' is the elapsed time since the previous frame.\n"
"#func _process(delta%FLOAT_TYPE%)%VOID_RETURN%:\n"
"#%TS%pass\n";
Expand Down

0 comments on commit 8450658

Please sign in to comment.