diff options
author | Paul Ouellette <oue.paul18@gmail.com> | 2020-06-09 13:37:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-09 19:37:25 +0200 |
commit | b16f841756ef86e83710ad2fddf2cd5bafdf4bcc (patch) | |
tree | 777e5dee13e1e2d20a7f8e4a5b8df19a7fad6b85 /src/inventory.h | |
parent | 09e285f38cd96b4278b921ab82c5266082bb1a0d (diff) | |
download | hax-minetest-server-b16f841756ef86e83710ad2fddf2cd5bafdf4bcc.tar.gz hax-minetest-server-b16f841756ef86e83710ad2fddf2cd5bafdf4bcc.zip |
LuaItemStack: Add __tostring metamethod (#8785)
* LuaItemStack: Add __tostring metamethod
* Clean up LuaItemStack::checkobject
Diffstat (limited to '')
-rw-r--r-- | src/inventory.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/inventory.h b/src/inventory.h index 2828d3e5a..67a7859ed 100644 --- a/src/inventory.h +++ b/src/inventory.h @@ -40,13 +40,13 @@ struct ItemStack ~ItemStack() = default; // Serialization - void serialize(std::ostream &os) const; + void serialize(std::ostream &os, bool serialize_meta = true) const; // Deserialization. Pass itemdef unless you don't want aliases resolved. void deSerialize(std::istream &is, IItemDefManager *itemdef = NULL); void deSerialize(const std::string &s, IItemDefManager *itemdef = NULL); // Returns the string used for inventory - std::string getItemString() const; + std::string getItemString(bool include_meta = true) const; // Returns the tooltip std::string getDescription(IItemDefManager *itemdef) const; |