]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/tool.h
Add screenshots to online content browser
[dragonfireclient.git] / src / tool.h
index c6bf0ad73fbee6b9e4b2f8cc4e9cd19e4b2298a4..00fae48815c865723d9dc33e07a786274f8d95a1 100644 (file)
@@ -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
@@ -89,9 +95,6 @@ struct DigParams
        {}
 };
 
-DigParams getDigParams(const ItemGroupList &groups,
-               const ToolCapabilities *tp, float time_from_last_punch);
-
 DigParams getDigParams(const ItemGroupList &groups,
                const ToolCapabilities *tp);