From: est31 Date: Tue, 21 Apr 2015 20:24:45 +0000 (+0200) Subject: Remove craftdef serialisation X-Git-Tag: 0.4.13~330 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=27e3a353d84c974dfea113df0eaa0aa7e93b7c6b;p=oweals%2Fminetest.git Remove craftdef serialisation It isn't needed anymore, sending ICraftDefManager over the network has been obsoleted by protocol version 7. --- 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