From 6341759d8eba09402f099b33843735e47d21adfe Mon Sep 17 00:00:00 2001 From: Relintai Date: Fri, 3 Jun 2022 17:26:07 +0200 Subject: [PATCH] Put class variables to the bottom of the class. --- game/addons/gdc_converter/plugin.gd | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/game/addons/gdc_converter/plugin.gd b/game/addons/gdc_converter/plugin.gd index ff41561d..a79977f8 100644 --- a/game/addons/gdc_converter/plugin.gd +++ b/game/addons/gdc_converter/plugin.gd @@ -2,7 +2,6 @@ tool extends EditorPlugin #TODO -#CamelCase Class names #variable transforms. -> Simple core types should be locals, the rest are pointers. Refs refs. #class variables to contructors #getters setters from class variables @@ -257,18 +256,7 @@ class GDSScope: s += "\n" indents += " " - - for l in scope_lines: - if l.begins_with("#"): - l = l.replace("#", "//") - s += indents + l + "\n" - continue - l = l.replace("#", ";//") - s += indents + l + ";\n" - - s += "\n" - for subs in subscopes: var scstr : String = subs.get_cpp_header_string(current_scope_level + 1) @@ -284,6 +272,16 @@ class GDSScope: s += indents + "protected:\n" s += indents + "static void _bind_methods();\n" + s += "\n" + + for l in scope_lines: + if l.begins_with("#"): + l = l.replace("#", "//") + s += indents + l + "\n" + continue + + l = l.replace("#", ";//") + s += indents + l + ";\n" if type == GDScopeType.GDSCOPE_TYPE_CLASS || type == GDScopeType.GDSCOPE_TYPE_ENUM: s += "};"