]> git.lizzy.rs Git - minetest.git/blobdiff - src/script/lua_api/l_nodemeta.cpp
Hardware coloring for itemstacks
[minetest.git] / src / script / lua_api / l_nodemeta.cpp
index 55d11fc13354a986ee471bbf9364acd098ead6f0..c65d56f14800f50564202ab027f04e822b504796 100644 (file)
@@ -204,6 +204,10 @@ void NodeMetaRef::RegisterCommon(lua_State *L)
        lua_pushcfunction(L, gc_object);
        lua_settable(L, metatable);
 
+       lua_pushliteral(L, "__eq");
+       lua_pushcfunction(L, l_equals);
+       lua_settable(L, metatable);
+
        lua_pop(L, 1);  // drop metatable
 }
 
@@ -225,6 +229,7 @@ const luaL_Reg NodeMetaRef::methodsServer[] = {
        luamethod(MetaDataRef, to_table),
        luamethod(MetaDataRef, from_table),
        luamethod(NodeMetaRef, get_inventory),
+       luamethod(MetaDataRef, equals),
        {0,0}
 };