#include <craftdef.h>
Public Types | |
enum | RecipePriority { PRIORITY_NO_RECIPE , PRIORITY_TOOLREPAIR , PRIORITY_SHAPELESS_AND_GROUPS , PRIORITY_SHAPELESS , PRIORITY_SHAPED_AND_GROUPS , PRIORITY_SHAPED } |
Public Member Functions | |
CraftDefinition ()=default | |
virtual | ~CraftDefinition ()=default |
virtual std::string | getName () const =0 |
virtual bool | check (const CraftInput &input, IGameDef *gamedef) const =0 |
RecipePriority | getPriority () const |
virtual CraftOutput | getOutput (const CraftInput &input, IGameDef *gamedef) const =0 |
virtual CraftInput | getInput (const CraftOutput &output, IGameDef *gamedef) const =0 |
virtual void | decrementInput (CraftInput &input, std::vector< ItemStack > &output_replacements, IGameDef *gamedef) const =0 |
CraftHashType | getHashType () const |
virtual u64 | getHash (CraftHashType type) const =0 |
virtual void | initHash (IGameDef *gamedef)=0 |
virtual std::string | dump () const =0 |
Protected Attributes | |
CraftHashType | hash_type |
RecipePriority | priority |
|
default |
|
virtualdefault |
|
pure virtual |
Implemented in CraftDefinitionCooking, CraftDefinitionFuel, CraftDefinitionShaped, CraftDefinitionShapeless, and CraftDefinitionToolRepair.
Referenced by CCraftDefManager::getCraftResult().
|
pure virtual |
Implemented in CraftDefinitionCooking, CraftDefinitionFuel, CraftDefinitionShaped, CraftDefinitionShapeless, and CraftDefinitionToolRepair.
Referenced by CCraftDefManager::getCraftResult().
|
pure virtual |
Implemented in CraftDefinitionCooking, CraftDefinitionFuel, CraftDefinitionShaped, CraftDefinitionShapeless, and CraftDefinitionToolRepair.
Referenced by CCraftDefManager::registerCraft().
|
pure virtual |
Implemented in CraftDefinitionCooking, CraftDefinitionFuel, CraftDefinitionShaped, CraftDefinitionShapeless, and CraftDefinitionToolRepair.
|
inline |
References hash_type.
|
pure virtual |
Implemented in CraftDefinitionCooking, CraftDefinitionFuel, CraftDefinitionShaped, CraftDefinitionShapeless, and CraftDefinitionToolRepair.
Referenced by push_craft_recipe().
|
pure virtual |
Implemented in CraftDefinitionCooking, CraftDefinitionFuel, CraftDefinitionShaped, CraftDefinitionShapeless, and CraftDefinitionToolRepair.
|
pure virtual |
Implemented in CraftDefinitionCooking, CraftDefinitionFuel, CraftDefinitionShaped, CraftDefinitionShapeless, and CraftDefinitionToolRepair.
Referenced by CCraftDefManager::getCraftResult(), push_craft_recipe(), and CCraftDefManager::registerCraft().
|
inline |
References priority.
Referenced by CCraftDefManager::getCraftResult().
|
pure virtual |
Implemented in CraftDefinitionCooking, CraftDefinitionFuel, CraftDefinitionShaped, CraftDefinitionShapeless, and CraftDefinitionToolRepair.
|
protected |
|
protected |