]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/craftdef.cpp
Don't include client/game.h on server build
[dragonfireclient.git] / src / craftdef.cpp
index 0181ceb60a6305674035bf2167e73e7c89ccc91b..c05a0cfb75c57984121425015e35c0ffdf7d0563 100644 (file)
@@ -734,7 +734,8 @@ bool CraftDefinitionCooking::check(const CraftInput &input, IGameDef *gamedef) c
        }
 
        // Check the single input item
-       return inputItemMatchesRecipe(input_filtered[0], recipe, gamedef->idef());
+       std::string rec_name = craftGetItemName(recipe, gamedef);
+       return inputItemMatchesRecipe(input_filtered[0], rec_name, gamedef->idef());
 }
 
 CraftOutput CraftDefinitionCooking::getOutput(const CraftInput &input, IGameDef *gamedef) const
@@ -836,7 +837,8 @@ bool CraftDefinitionFuel::check(const CraftInput &input, IGameDef *gamedef) cons
        }
 
        // Check the single input item
-       return inputItemMatchesRecipe(input_filtered[0], recipe, gamedef->idef());
+       std::string rec_name = craftGetItemName(recipe, gamedef);
+       return inputItemMatchesRecipe(input_filtered[0], rec_name, gamedef->idef());
 }
 
 CraftOutput CraftDefinitionFuel::getOutput(const CraftInput &input, IGameDef *gamedef) const
@@ -1066,8 +1068,8 @@ class CCraftDefManager: public IWritableCraftDefManager
        }
        virtual void registerCraft(CraftDefinition *def, IGameDef *gamedef)
        {
-               verbosestream << "registerCraft: registering craft definition: "
-                               << def->dump() << std::endl;
+               TRACESTREAM(<< "registerCraft: registering craft definition: "
+                               << def->dump() << std::endl);
                m_craft_defs[(int) CRAFT_HASH_TYPE_UNHASHED][0].push_back(def);
 
                CraftInput input;