From dc5bc6cac7b81ab27e0064bc25b5fd1d8d617340 Mon Sep 17 00:00:00 2001 From: Vincent Glize Date: Sat, 29 Apr 2017 12:08:16 +0200 Subject: [CSM] Add event on_place_node API lua (#5548) * [CSM] Add event on_place_node API lua --- src/script/cpp_api/s_item.cpp | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) (limited to 'src/script/cpp_api/s_item.cpp') diff --git a/src/script/cpp_api/s_item.cpp b/src/script/cpp_api/s_item.cpp index cbb833807..032018f2f 100644 --- a/src/script/cpp_api/s_item.cpp +++ b/src/script/cpp_api/s_item.cpp @@ -249,27 +249,6 @@ void ScriptApiItem::pushPointedThing(const PointedThing& pointed) { lua_State* L = getStack(); - lua_newtable(L); - if(pointed.type == POINTEDTHING_NODE) - { - lua_pushstring(L, "node"); - lua_setfield(L, -2, "type"); - push_v3s16(L, pointed.node_undersurface); - lua_setfield(L, -2, "under"); - push_v3s16(L, pointed.node_abovesurface); - lua_setfield(L, -2, "above"); - } - else if(pointed.type == POINTEDTHING_OBJECT) - { - lua_pushstring(L, "object"); - lua_setfield(L, -2, "type"); - objectrefGet(L, pointed.object_id); - lua_setfield(L, -2, "ref"); - } - else - { - lua_pushstring(L, "nothing"); - lua_setfield(L, -2, "type"); - } + push_pointed_thing(L, pointed); } -- cgit v1.2.3