diff --git a/src/bind.inc.php b/src/bind.inc.php index d1394a6..0bb8224 100644 --- a/src/bind.inc.php +++ b/src/bind.inc.php @@ -51,7 +51,7 @@ function bhl_prepare_meta(\mtgMetaInfo $orig) $arr_proxies = array(); foreach($meta->getUnits() as $u) { - if($u->object instanceof \mtgMetaStruct) + if($u->object instanceof \mtgMetaStruct && !$u->object->hasToken('bhl_ecs_component')) { $need_to_replace = false; $fields = $u->object->getFields(); diff --git a/tpl/macro.twig b/tpl/macro.twig index 1d93caf..87f4faa 100644 --- a/tpl/macro.twig +++ b/tpl/macro.twig @@ -513,14 +513,14 @@ Script_{{o.name|norm_name}}.Method_{{m.name}}.ReturnValue(frm, stack cl.Define(vs); } { - var fn = new FuncSymbolNative("At", types.T("{{o.name}}"), + var fn = new FuncSymbolNative("At", types.T("{{token(o, 'bhl_native_arr_proxy').name}}"), delegate(VM.Frame frm, ValStack stack, FuncArgsInfo args_info, ref BHS status) { #if !BHL_FRONT var val_idx = stack.Pop(); var val_lst = stack.Pop(); - var v = ((List<{{token(o, 'bhl_native_arr_proxy').name}}>)val_lst.obj)[(int)val_idx._num]; + var v = ((List<{{token(o, 'bhl_native_arr_proxy')|native_type}}>)val_lst.obj)[(int)val_idx._num]; var dv = Val.New(frm.vm); {{ _self.native2val(token(o, 'bhl_native_arr_proxy'), 'v', 'dv') }};