neolua
neolua copied to clipboard
Fix require
Fixed require to work the same as Lua 5.3, with the exception that no C native librares are supported and package.config is still ignored.
Are you so kind and split the pull requests?
LuaTable
supports the LuaMember
...
public class LuaMath : LuaTable
{
[LuaMember]
public double abs(double value)
...
it is functional equal to
math["abs"] = new Func<double, double>(Abs);
but supports overloads and is a little bit optimized.
Only variables should be set like
math["PI"] = Math.PI
Or
public double PI => Math.PI;
The last variant, can be reset by Math.PI = nil
.
If do not want, the value should be changed:
[LuaMember]
public double PI {get => Math.PI; set {} }
And please fix the formatting of your changes.
Overall good work.
Can you rebase this pull request?
It would be nice, if you rebase or send me a diff with your changes.