#include <craftdef.h>
Public Member Functions | |
CraftDefinitionShaped ()=delete | |
CraftDefinitionShaped (const std::string &output_, unsigned int width_, const std::vector< std::string > &recipe_, const CraftReplacements &replacements_) | |
virtual | ~CraftDefinitionShaped ()=default |
virtual std::string | getName () const |
virtual bool | check (const CraftInput &input, IGameDef *gamedef) const |
virtual CraftOutput | getOutput (const CraftInput &input, IGameDef *gamedef) const |
virtual CraftInput | getInput (const CraftOutput &output, IGameDef *gamedef) const |
virtual void | decrementInput (CraftInput &input, std::vector< ItemStack > &output_replacements, IGameDef *gamedef) const |
virtual u64 | getHash (CraftHashType type) const |
virtual void | initHash (IGameDef *gamedef) |
virtual std::string | dump () const |
Public Member Functions inherited from CraftDefinition | |
CraftDefinition ()=default | |
virtual | ~CraftDefinition ()=default |
RecipePriority | getPriority () const |
CraftHashType | getHashType () const |
Private Attributes | |
std::string | output = "" |
unsigned int | width = 1 |
std::vector< std::string > | recipe |
std::vector< std::string > | recipe_names |
bool | hash_inited = false |
CraftReplacements | replacements |
Additional Inherited Members | |
Public Types inherited from CraftDefinition | |
enum | RecipePriority { PRIORITY_NO_RECIPE , PRIORITY_TOOLREPAIR , PRIORITY_SHAPELESS_AND_GROUPS , PRIORITY_SHAPELESS , PRIORITY_SHAPED_AND_GROUPS , PRIORITY_SHAPED } |
Protected Attributes inherited from CraftDefinition | |
CraftHashType | hash_type |
RecipePriority | priority |
|
delete |
CraftDefinitionShaped::CraftDefinitionShaped | ( | const std::string & | output_, |
unsigned int | width_, | ||
const std::vector< std::string > & | recipe_, | ||
const CraftReplacements & | replacements_ ) |
References hasGroupItem(), CraftDefinition::priority, CraftDefinition::PRIORITY_SHAPED, CraftDefinition::PRIORITY_SHAPED_AND_GROUPS, and recipe.
|
virtualdefault |
|
virtual |
Implements CraftDefinition.
References CRAFT_METHOD_NORMAL, craftGetBounds(), craftGetItemNames(), hash_inited, IGameDef::idef(), inputItemMatchesRecipe(), CraftInput::items, CraftInput::method, recipe, recipe_names, width, and CraftInput::width.
|
virtual |
Implements CraftDefinition.
References craftDecrementOrReplaceInput(), and replacements.
|
virtual |
Implements CraftDefinition.
References craftDumpMatrix(), CraftReplacements::dump(), output, recipe, replacements, and width.
|
virtual |
Implements CraftDefinition.
References CRAFT_HASH_TYPE_COUNT, CRAFT_HASH_TYPE_ITEM_NAMES, getHashForGrid(), hash_inited, and recipe_names.
|
virtual |
Implements CraftDefinition.
References CRAFT_METHOD_NORMAL, craftGetItems(), recipe, and width.
|
virtual |
Implements CraftDefinition.
|
virtual |
Implements CraftDefinition.
References output.
|
virtual |
Implements CraftDefinition.
References CRAFT_HASH_TYPE_COUNT, CRAFT_HASH_TYPE_ITEM_NAMES, craftGetItemNames(), hasGroupItem(), hash_inited, CraftDefinition::hash_type, recipe, and recipe_names.
|
private |
Referenced by check(), getHash(), and initHash().
|
private |
Referenced by dump(), and getOutput().
|
private |
Referenced by CraftDefinitionShaped(), check(), dump(), getInput(), and initHash().
|
private |
Referenced by check(), getHash(), and initHash().
|
private |
Referenced by decrementInput(), and dump().
|
private |
Referenced by check(), dump(), and getInput().