Fixing bug related to global types assignment order

This commit is contained in:
Pavel Shevaev 2023-03-28 19:56:08 +03:00
parent 8886377dc2
commit 4b3dbb2206
2 changed files with 5 additions and 4 deletions

View File

@ -24,10 +24,11 @@ static public class BHL_AutoBindings {
public static void Register(Types types)
{
BHL_Types.Type_GenericArray = new GenericArrayTypeSymbol(new Proxy<IType>());
{% block register %}
{{ macro.call_reg_units(slice_units(meta.units, 20)) }}
BHL_Types.Type_GenericArray = new GenericArrayTypeSymbol(new Proxy<IType>());
{{ macro.assign_global_types(meta.units) }}
{% endblock %}
}

View File

@ -1030,7 +1030,9 @@ public partial class Script_{{u.object.name}} {
{%- endif -%}
{%- endfor ~%}
{%- endmacro -%}
{%- macro assign_global_types(units) ~%}
//assign global static types
{%- for u in units -%}
{%- if u.object is instanceof('\\mtgMetaStruct') ~%}
@ -1047,6 +1049,4 @@ public partial class Script_{{u.object.name}} {
{%- endif -%}
{%- endfor -%}
{%- endmacro -%}