WIP unpacking of parameters.

This commit is contained in:
gnembon committed 2021-04-21 12:21:47 -03:00
1 parent 72a3d74a97
commit a65d16c9ba
11 files changed
+106 -30

No files matched your search

@@ -308,7 +308,7 @@ public class Entities {
}
else
{
types.forEach(et -> events.addBuiltInEvent(CarpetEventServer.Event.getEntityLoadEventName(et), c.host, funArg.function, FunctionValue.resolveArgs(funArg.args, c, t)));
types.forEach(et -> events.addBuiltInEvent(CarpetEventServer.Event.getEntityLoadEventName(et), c.host, funArg.function, funArg.unpackArgs(c)));
}
Value ret = new NumericValue(types.size());
return (cc, tt) -> ret;
@@ -326,7 +326,7 @@ public class Entities {
FunctionArgument<LazyValue> funArg = FunctionArgument.findIn(c, expression.module, lv, 2, true, false);
((EntityValue) v).setEvent((CarpetContext)c, what, funArg.function, FunctionValue.resolveArgs(funArg.args, c, t));
((EntityValue) v).setEvent((CarpetContext)c, what, funArg.function, funArg.unpackArgs(c));
return LazyValue.NULL;
});