Changes due to bhl class symbols inheritance changes

This commit is contained in:
Pavel Shevaev 2022-12-13 16:56:01 +03:00
parent 8c9cd5c5b0
commit 789bd45612
1 changed files with 6 additions and 9 deletions

View File

@ -520,12 +520,9 @@ Script_{{o.name|norm_name}}.Method_{{m.name}}.ReturnValue(frm, stack
{
var cl = new ClassSymbolNative("{{o.name|ns_last}}",
{% if o.parent %}
(ClassSymbol)types.T("{{o.parent}}").Get(),
{% else ~%}
//no parent
null,
{% endif %}
{% if o.parent %}
types.T("{{o.parent}}"),
{% endif %}
{% if has_token(o, 'bhl_no_new') ~%}
//constructor is not allowed
null
@ -563,8 +560,6 @@ Script_{{o.name|norm_name}}.Method_{{m.name}}.ReturnValue(frm, stack
{{ _self.method_partial(o, m, 'cl') }}
{% endif %}
{% endfor %}
cl.Setup();
}
{% endif %}
@ -724,7 +719,7 @@ Script_{{o.name|norm_name}}.Method_{{m.name}}.ReturnValue(frm, stack
{% if has_token(o, 'bhl_ecs_component_ref') %}
{
var cl = new ClassSymbolNative("{{o.name}}__Ref", null, null);
var cl = new ClassSymbolNative("{{o.name}}__Ref");
types.ns.Define(cl);
{% for f in o.getfields %}
{{ _self.ecs_component_field_ref(o, f) }}
@ -975,6 +970,8 @@ public partial class Script_{{u.object.name}} {
var tmp = types.T("{{u.object.name}}").Get();
if(tmp == null)
throw new System.Exception("Type '{{u.object.name}}' not resolved");
if(tmp is ClassSymbol cs)
cs.Setup();
BHL_Types.Type_{{u.object.name|norm_name}} = tmp;
}
{%~ endif ~%}