diff options
author | Perttu Ahola <celeron55@gmail.com> | 2012-03-28 22:50:08 +0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2012-03-28 22:50:08 +0300 |
commit | a3a400992e987307d743028b60237ef0bcae533a (patch) | |
tree | 65fe8c39cd58338a41a29e15933c4f579bd74a54 /src | |
parent | 68625b047f1fdebba747a83630163af99faf17e3 (diff) | |
download | minetest-a3a400992e987307d743028b60237ef0bcae533a.tar.gz minetest-a3a400992e987307d743028b60237ef0bcae533a.tar.bz2 minetest-a3a400992e987307d743028b60237ef0bcae533a.zip |
Add EnvRef:set_node()
Diffstat (limited to 'src')
-rw-r--r-- | src/scriptapi.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/scriptapi.cpp b/src/scriptapi.cpp index 70ca6c86a..38d681e9b 100644 --- a/src/scriptapi.cpp +++ b/src/scriptapi.cpp @@ -2791,11 +2791,11 @@ private: // Exported functions - // EnvRef:add_node(pos, node) + // EnvRef:set_node(pos, node) // pos = {x=num, y=num, z=num} - static int l_add_node(lua_State *L) + static int l_set_node(lua_State *L) { - //infostream<<"EnvRef::l_add_node()"<<std::endl; + //infostream<<"EnvRef::l_set_node()"<<std::endl; EnvRef *o = checkobject(L, 1); ServerEnvironment *env = o->m_env; if(env == NULL) return 0; @@ -2809,6 +2809,11 @@ private: return 1; } + static int l_add_node(lua_State *L) + { + return l_set_node(L); + } + // EnvRef:remove_node(pos) // pos = {x=num, y=num, z=num} static int l_remove_node(lua_State *L) @@ -3118,6 +3123,7 @@ public: }; const char EnvRef::className[] = "EnvRef"; const luaL_reg EnvRef::methods[] = { + method(EnvRef, set_node), method(EnvRef, add_node), method(EnvRef, remove_node), method(EnvRef, get_node), |