Overriding the equality method of a lua table like this function:
private static readonly LuaFunction eq = new(nameof(eq), static (context, _) =>
{
var a = CharactersByTable[context.GetArgument<LuaTable>(0)];
var b = CharactersByTable[context.GetArgument<LuaTable>(1)];
var result = a == b;
return new ValueTask<int>(context.Return(result));
});
And assigning it to a lua table like so:
new LuaTable
{
Metatable = Metatable ??= new LuaTable
{
[Metamethods.Eq] = eq
}
};
does not actually invoke the LuaFunction when using the == operator inside Lua.
Is this a known issue that only the Index and Newindex operators are implemented?
Version 0.5.1
Overriding the equality method of a lua table like this function:
And assigning it to a lua table like so:
does not actually invoke the LuaFunction when using the == operator inside Lua.
Is this a known issue that only the Index and Newindex operators are implemented?
Version 0.5.1