From 727de643ee140c212cc4b14b7940c8c0ba51ad0f Mon Sep 17 00:00:00 2001 From: wrenge Date: Thu, 12 Oct 2023 17:06:13 +0300 Subject: [PATCH] Proper ecslite bindings --- tpl/macro.twig | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tpl/macro.twig b/tpl/macro.twig index 0a8a51d..0dcf728 100644 --- a/tpl/macro.twig +++ b/tpl/macro.twig @@ -944,7 +944,7 @@ Script_{{o.name|norm_name}}.Method_{{m.name}}.ReturnValue(frm, stack if (e.Unpack(out EcsWorld world, out int id) == false) return null; - ref var cmp = ref world.Ensure(id); + ref var cmp = ref world.GetPool<{{o.name}}>().Ensure(id); return null; } @@ -967,7 +967,7 @@ Script_{{o.name|norm_name}}.Method_{{m.name}}.ReturnValue(frm, stack if (e.Unpack(out EcsWorld world, out int id) == false) return null; - world.Del(id); + world.GetPool<{{o.name}}>().Del(id); return null; } @@ -991,7 +991,7 @@ Script_{{o.name|norm_name}}.Method_{{m.name}}.ReturnValue(frm, stack return null; var dv = bhl.Val.New(frm.vm); - dv.SetBool(world.Has(id)); + dv.SetBool(world.GetPool<{{o.name}}>().Has(id)); stack.Push(dv); return null; @@ -1036,7 +1036,7 @@ Script_{{o.name|norm_name}}.Method_{{m.name}}.ReturnValue(frm, stack if (e.Unpack(out EcsWorld world, out int id) == false) return null; - ref var cmp = ref world.Ensure(id); + ref var cmp = ref world.GetPool<{{o.name}}>().Ensure(id); var v = cmp.{{f.name}}; {%- if token_or(f, 'bhl_set', 1) != 0 ~%} @@ -1080,7 +1080,7 @@ Script_{{o.name|norm_name}}.Method_{{m.name}}.ReturnValue(frm, stack if (e.Unpack(out EcsWorld world, out int id) == false) return null; - ref var cmp = ref world.Ensure(id); + ref var cmp = ref world.GetPool<{{o.name}}>().Ensure(id); {%~ if m.returntype %} var return_val =