mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
LuaItemStack: Add __tostring metamethod (#8785)
* LuaItemStack: Add __tostring metamethod * Clean up LuaItemStack::checkobject
This commit is contained in:
parent
09e285f38c
commit
b16f841756
5 changed files with 41 additions and 22 deletions
|
@ -20,6 +20,8 @@ local function basic_dump(o)
|
|||
-- dump's output is intended for humans.
|
||||
--elseif tp == "function" then
|
||||
-- return string.format("loadstring(%q)", string.dump(o))
|
||||
elseif tp == "userdata" then
|
||||
return tostring(o)
|
||||
else
|
||||
return string.format("<%s>", tp)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue