mirror of
https://github.com/luanti-org/luanti.git
synced 2025-09-30 19:22:14 +00:00
Implement helpful __tostring
for all userdata-based classes
This commit is contained in:
parent
9ad23e4384
commit
747857bffa
22 changed files with 103 additions and 66 deletions
|
@ -362,7 +362,7 @@ void LuaSettings::Register(lua_State* L)
|
|||
{"__gc", gc_object},
|
||||
{0, 0}
|
||||
};
|
||||
registerClass(L, className, methods, metamethods);
|
||||
registerClass<LuaSettings>(L, methods, metamethods);
|
||||
|
||||
// Can be created from Lua (Settings(filename))
|
||||
lua_register(L, className, create_object);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue