mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 08:35:20 +02:00
Add name field to registered entities
This commit is contained in:
@@ -2652,6 +2652,10 @@ static int l_register_entity(lua_State *L)
|
||||
|
||||
// Get registered object to top of stack
|
||||
lua_pushvalue(L, 2);
|
||||
|
||||
// Set name field
|
||||
lua_pushvalue(L, 1);
|
||||
lua_setfield(L, -2, "name");
|
||||
|
||||
// Set __index to point to itself
|
||||
lua_pushvalue(L, -1);
|
||||
|
Reference in New Issue
Block a user