mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-06 17:41:04 +00:00
Minor script api fixes/cleanups
This commit is contained in:
parent
5b6bc8a12b
commit
524d446757
11 changed files with 37 additions and 36 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue