diff options
author | raymoo <uguu@installgentoo.com> | 2017-04-18 16:30:27 -0700 |
---|---|---|
committer | paramat <mat.gregory@virginmedia.com> | 2017-10-29 11:57:38 +0000 |
commit | a637107a4e81be88938d68df4deae50e68cf2cd8 (patch) | |
tree | 2d35b9bf380af88bb7618a6b4efbca6f55c338d3 /src/tool.h | |
parent | 610ea6f21629933be3b38c2b5fce53a35c5aac3a (diff) | |
download | minetest-a637107a4e81be88938d68df4deae50e68cf2cd8.tar.gz minetest-a637107a4e81be88938d68df4deae50e68cf2cd8.tar.bz2 minetest-a637107a4e81be88938d68df4deae50e68cf2cd8.zip |
Allow overriding tool capabilities through itemstack metadata
This makes it possible to modify the tool capabilities of individual
itemstacks by calling a method on itemstack metadata references.
Diffstat (limited to 'src/tool.h')
-rw-r--r-- | src/tool.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/tool.h b/src/tool.h index c6bf0ad73..f6b196a49 100644 --- a/src/tool.h +++ b/src/tool.h @@ -23,6 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include <string> #include <iostream> #include "itemgroup.h" +#include <json/json.h> struct ToolGroupCap { @@ -42,6 +43,9 @@ struct ToolGroupCap *time = i->second; return true; } + + void toJson(Json::Value &object) const; + void fromJson(const Json::Value &json); }; @@ -69,6 +73,8 @@ struct ToolCapabilities void serialize(std::ostream &os, u16 version) const; void deSerialize(std::istream &is); + void serializeJson(std::ostream &os) const; + void deserializeJson(std::istream &is); }; struct DigParams |