Proper ecslite bindings

This commit is contained in:
wrenge 2023-10-12 17:06:13 +03:00
parent b8569f3082
commit 727de643ee
1 changed files with 5 additions and 5 deletions

View File

@ -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<ecs.{{o.name}}>(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<ecs.{{o.name}}>(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<ecs.{{o.name}}>(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<ecs.{{o.name}}>(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<ecs.{{o.name}}>(id);
ref var cmp = ref world.GetPool<{{o.name}}>().Ensure(id);
{%~ if m.returntype %}
var return_val =