From 27e3a353d84c974dfea113df0eaa0aa7e93b7c6b Mon Sep 17 00:00:00 2001 From: est31 Date: Tue, 21 Apr 2015 22:24:45 +0200 Subject: Remove craftdef serialisation It isn't needed anymore, sending ICraftDefManager over the network has been obsoleted by protocol version 7. --- src/craftdef.cpp | 147 ------------------------------------------------------- src/craftdef.h | 32 +----------- 2 files changed, 2 insertions(+), 177 deletions(-) diff --git a/src/craftdef.cpp b/src/craftdef.cpp index d3ac8a458..6fc0ae934 100644 --- a/src/craftdef.cpp +++ b/src/craftdef.cpp @@ -322,63 +322,6 @@ std::string CraftReplacements::dump() const return os.str(); } -void CraftReplacements::serialize(std::ostream &os) const -{ - writeU16(os, pairs.size()); - for (u32 i=0; ideSerializeBody(is, version); - return def; -} - /* CraftDefinitionShaped */ @@ -513,29 +456,6 @@ std::string CraftDefinitionShaped::dump() const return os.str(); } -void CraftDefinitionShaped::serializeBody(std::ostream &os) const -{ - os << serializeString(output); - writeU16(os, width); - writeU16(os, recipe.size()); - for (u32 i=0; i getCraftRecipes(CraftOutput &output, IGameDef *gamedef, unsigned limit=0) const=0; - + // Print crafting recipes for debugging virtual std::string dump() const=0; }; @@ -443,7 +415,7 @@ public: // The main crafting function virtual bool getCraftResult(CraftInput &input, CraftOutput &output, bool decrementInput, IGameDef *gamedef) const=0; - virtual std::vector getCraftRecipes(CraftOutput &output, + virtual std::vector getCraftRecipes(CraftOutput &output, IGameDef *gamedef, unsigned limit=0) const=0; // Print crafting recipes for debugging -- cgit v1.2.3