mirror of
https://github.com/luanti-org/luanti.git
synced 2025-12-31 18:35:20 +01:00
Minor script api fixes/cleanups
This commit is contained in:
@@ -59,8 +59,7 @@ bool ScriptApiEntity::luaentity_Add(u16 id, const char *name)
|
||||
// This should be userdata with metatable ObjectRef
|
||||
push_objectRef(L, id);
|
||||
luaL_checktype(L, -1, LUA_TUSERDATA);
|
||||
if (!luaL_checkudata(L, -1, "ObjectRef"))
|
||||
luaL_typerror(L, -1, "ObjectRef");
|
||||
luaL_checkudata(L, -1, "ObjectRef");
|
||||
lua_setfield(L, -2, "object");
|
||||
|
||||
// core.luaentities[id] = object
|
||||
|
||||
Reference in New Issue
Block a user