From 34c6ed167c621ff83811abb6e19e14a4de84bad0 Mon Sep 17 00:00:00 2001 From: Pavel Shevaev Date: Mon, 3 Apr 2023 10:29:42 +0300 Subject: [PATCH] Replacing @bhl_no_itype with @bhl_itype --- src/bind.inc.php | 3 +-- tpl/macro.twig | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/bind.inc.php b/src/bind.inc.php index 2856783..99dec52 100644 --- a/src/bind.inc.php +++ b/src/bind.inc.php @@ -38,7 +38,7 @@ function supported_tokens() 'bhl_set', 'bhl_ref_arg', 'bhl_bin_op', - 'bhl_no_itype' + 'bhl_itype' ]; } @@ -64,7 +64,6 @@ function prepare_meta(\mtgMetaInfo $orig) { $proxy = new \mtgMetaStruct($proxy_name); $proxy->setToken('bhl_native_arr_proxy', $fld->getType()->getValue()); - $proxy->setToken('bhl_no_itype', true); $meta->addUnit(new \mtgMetaInfoUnit('', $proxy)); $arr_proxies[$proxy_name] = $proxy; } diff --git a/tpl/macro.twig b/tpl/macro.twig index 915d1b9..f0c158a 100644 --- a/tpl/macro.twig +++ b/tpl/macro.twig @@ -493,9 +493,7 @@ Script_{{o.name|norm_name}}.Method_{{m.name}}.ReturnValue(frm, stack {%- if has_token(type, 'bhl_custom_rw') -%} {{value}}.Encode({{native}}) {%- else -%} - {%if not has_token(type, "bhl_no_itype") and - not has_token(type, "bhl_ecs_component") and - not has_token(type, "POD") -%} + {%if has_token(type, "bhl_itype") -%} {{value}}.SetObj({{native}}, {{native}}?.GetIType()) {%- else -%} {{value}}.SetObj({{native}}, BHL_Types.Type_{{type.name|norm_name}})