CraftOutput():
item(""), time(0)
{}
- CraftOutput(std::string item_, float time_):
+ CraftOutput(const std::string &item_, float time_):
item(item_), time(time_)
{}
std::string dump() const;
CraftReplacements():
pairs()
{}
- CraftReplacements(std::vector<std::pair<std::string, std::string> > pairs_):
+ CraftReplacements(const std::vector<std::pair<std::string, std::string> > &pairs_):
pairs(pairs_)
{}
std::string dump() const;
CraftDefinitionFuel():
recipe(""), hash_inited(false), burntime()
{}
- CraftDefinitionFuel(std::string recipe_,
+ CraftDefinitionFuel(const std::string &recipe_,
float burntime_,
const CraftReplacements &replacements_):
- recipe(recipe_), hash_inited(false), burntime(burntime_), replacements(replacements_)
+ recipe(recipe_),
+ hash_inited(false),
+ burntime(burntime_),
+ replacements(replacements_)
{}
virtual ~CraftDefinitionFuel(){}
virtual std::vector<CraftDefinition*> getCraftRecipes(CraftOutput &output,
IGameDef *gamedef, unsigned limit=0) const=0;
+ virtual bool clearCraftRecipesByOutput(const CraftOutput &output, IGameDef *gamedef) = 0;
+ virtual bool clearCraftRecipesByInput(CraftMethod craft_method,
+ unsigned int craft_grid_width, const std::vector<std::string> &recipe, IGameDef *gamedef) = 0;
+
// Print crafting recipes for debugging
virtual std::string dump() const=0;