1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-14 09:05:19 +02:00

[CSM] Add event on_place_node API lua (#5548)

* [CSM] Add event on_place_node API lua
This commit is contained in:
Vincent Glize
2017-04-29 12:08:16 +02:00
committed by Loïc Blot
parent ecf08255b0
commit dc5bc6cac7
12 changed files with 88 additions and 37 deletions

View File

@@ -57,7 +57,7 @@ bool ScriptApiEntity::luaentity_Add(u16 id, const char *name)
// Add object reference
// This should be userdata with metatable ObjectRef
objectrefGet(L, id);
push_objectRef(L, id);
luaL_checktype(L, -1, LUA_TUSERDATA);
if (!luaL_checkudata(L, -1, "ObjectRef"))
luaL_typerror(L, -1, "ObjectRef");