LuaItemStack: Add __tostring metamethod (#8785)
* LuaItemStack: Add __tostring metamethod * Clean up LuaItemStack::checkobject
This commit is contained in:
parent
ffaa3cdd6b
commit
81e7460b30
|
@ -20,6 +20,8 @@ local function basic_dump(o)
|
||||||
-- dump's output is intended for humans.
|
-- dump's output is intended for humans.
|
||||||
--elseif tp == "function" then
|
--elseif tp == "function" then
|
||||||
-- return string.format("loadstring(%q)", string.dump(o))
|
-- return string.format("loadstring(%q)", string.dump(o))
|
||||||
|
elseif tp == "userdata" then
|
||||||
|
return tostring(o)
|
||||||
else
|
else
|
||||||
return string.format("<%s>", tp)
|
return string.format("<%s>", tp)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue