summaryrefslogtreecommitdiff
path: root/src/script/lua_api/l_item.h
diff options
context:
space:
mode:
authorPaul Ouellette <oue.paul18@gmail.com>2020-06-09 13:37:25 -0400
committerGitHub <noreply@github.com>2020-06-09 19:37:25 +0200
commitb16f841756ef86e83710ad2fddf2cd5bafdf4bcc (patch)
tree777e5dee13e1e2d20a7f8e4a5b8df19a7fad6b85 /src/script/lua_api/l_item.h
parent09e285f38cd96b4278b921ab82c5266082bb1a0d (diff)
downloadminetest-b16f841756ef86e83710ad2fddf2cd5bafdf4bcc.tar.gz
minetest-b16f841756ef86e83710ad2fddf2cd5bafdf4bcc.tar.bz2
minetest-b16f841756ef86e83710ad2fddf2cd5bafdf4bcc.zip
LuaItemStack: Add __tostring metamethod (#8785)
* LuaItemStack: Add __tostring metamethod * Clean up LuaItemStack::checkobject
Diffstat (limited to 'src/script/lua_api/l_item.h')
-rw-r--r--src/script/lua_api/l_item.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/script/lua_api/l_item.h b/src/script/lua_api/l_item.h
index 6fab58045..98744c071 100644
--- a/src/script/lua_api/l_item.h
+++ b/src/script/lua_api/l_item.h
@@ -34,6 +34,9 @@ private:
// garbage collector
static int gc_object(lua_State *L);
+ // __tostring metamethod
+ static int mt_tostring(lua_State *L);
+
// is_empty(self) -> true/false
static int l_is_empty(lua_State *L);