aboutsummaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
authorSmallJoker <SmallJoker@users.noreply.github.com>2021-10-12 20:12:20 +0200
committerGitHub <noreply@github.com>2021-10-12 20:12:20 +0200
commitecc6f4ba25cd49599922333a5f8d4b4ce368992d (patch)
tree9e54d0968bde5faf2f1870c5c806fa30521a695d /src/script
parent6de8d77e17017cd5cc7b065d42566b6b1cd076cc (diff)
downloadhax-minetest-server-ecc6f4ba25cd49599922333a5f8d4b4ce368992d.tar.gz
hax-minetest-server-ecc6f4ba25cd49599922333a5f8d4b4ce368992d.zip
Remove a few unused functions reported by callcatcher (#11658)
Diffstat (limited to 'src/script')
-rw-r--r--src/script/lua_api/l_inventory.cpp13
-rw-r--r--src/script/lua_api/l_inventory.h2
-rw-r--r--src/script/lua_api/l_nodemeta.cpp5
3 files changed, 4 insertions, 16 deletions
diff --git a/src/script/lua_api/l_inventory.cpp b/src/script/lua_api/l_inventory.cpp
index 0dd418462..b0a4ee194 100644
--- a/src/script/lua_api/l_inventory.cpp
+++ b/src/script/lua_api/l_inventory.cpp
@@ -421,19 +421,6 @@ void InvRef::create(lua_State *L, const InventoryLocation &loc)
luaL_getmetatable(L, className);
lua_setmetatable(L, -2);
}
-void InvRef::createPlayer(lua_State *L, RemotePlayer *player)
-{
- NO_MAP_LOCK_REQUIRED;
- InventoryLocation loc;
- loc.setPlayer(player->getName());
- create(L, loc);
-}
-void InvRef::createNodeMeta(lua_State *L, v3s16 p)
-{
- InventoryLocation loc;
- loc.setNodeMeta(p);
- create(L, loc);
-}
void InvRef::Register(lua_State *L)
{
diff --git a/src/script/lua_api/l_inventory.h b/src/script/lua_api/l_inventory.h
index 94f670c9d..6a75bac0f 100644
--- a/src/script/lua_api/l_inventory.h
+++ b/src/script/lua_api/l_inventory.h
@@ -111,8 +111,6 @@ public:
// Creates an InvRef and leaves it on top of stack
// Not callable from Lua; all references are created on the C side.
static void create(lua_State *L, const InventoryLocation &loc);
- static void createPlayer(lua_State *L, RemotePlayer *player);
- static void createNodeMeta(lua_State *L, v3s16 p);
static void Register(lua_State *L);
};
diff --git a/src/script/lua_api/l_nodemeta.cpp b/src/script/lua_api/l_nodemeta.cpp
index 60d14f8f2..34760157d 100644
--- a/src/script/lua_api/l_nodemeta.cpp
+++ b/src/script/lua_api/l_nodemeta.cpp
@@ -89,7 +89,10 @@ int NodeMetaRef::l_get_inventory(lua_State *L)
NodeMetaRef *ref = checkobject(L, 1);
ref->getmeta(true); // try to ensure the metadata exists
- InvRef::createNodeMeta(L, ref->m_p);
+
+ InventoryLocation loc;
+ loc.setNodeMeta(ref->m_p);
+ InvRef::create(L, loc);
return 1;
}