#include <craftdef.h>
|
| IWritableCraftDefManager ()=default |
|
virtual | ~IWritableCraftDefManager ()=default |
|
virtual bool | getCraftResult (CraftInput &input, CraftOutput &output, std::vector< ItemStack > &output_replacements, bool decrementInput, IGameDef *gamedef) const =0 |
| The main crafting function.
|
|
virtual std::vector< CraftDefinition * > | getCraftRecipes (CraftOutput &output, IGameDef *gamedef, unsigned limit=0) const =0 |
|
virtual bool | clearCraftsByOutput (const CraftOutput &output, IGameDef *gamedef)=0 |
|
virtual bool | clearCraftsByInput (const CraftInput &input, IGameDef *gamedef)=0 |
|
virtual std::string | dump () const =0 |
|
virtual void | registerCraft (CraftDefinition *def, IGameDef *gamedef)=0 |
|
virtual void | clear ()=0 |
|
virtual void | initHashes (IGameDef *gamedef)=0 |
|
| ICraftDefManager ()=default |
|
virtual | ~ICraftDefManager ()=default |
|
virtual bool | getCraftResult (CraftInput &input, CraftOutput &output, std::vector< ItemStack > &output_replacements, bool decrementInput, IGameDef *gamedef) const =0 |
| The main crafting function.
|
|
virtual std::vector< CraftDefinition * > | getCraftRecipes (CraftOutput &output, IGameDef *gamedef, unsigned limit=0) const =0 |
|
virtual std::string | dump () const =0 |
|
◆ IWritableCraftDefManager()
IWritableCraftDefManager::IWritableCraftDefManager |
( |
| ) |
|
|
default |
◆ ~IWritableCraftDefManager()
virtual IWritableCraftDefManager::~IWritableCraftDefManager |
( |
| ) |
|
|
virtualdefault |
◆ clear()
virtual void IWritableCraftDefManager::clear |
( |
| ) |
|
|
pure virtual |
◆ clearCraftsByInput()
virtual bool IWritableCraftDefManager::clearCraftsByInput |
( |
const CraftInput & |
input, |
|
|
IGameDef * |
gamedef |
|
) |
| |
|
pure virtual |
◆ clearCraftsByOutput()
virtual bool IWritableCraftDefManager::clearCraftsByOutput |
( |
const CraftOutput & |
output, |
|
|
IGameDef * |
gamedef |
|
) |
| |
|
pure virtual |
◆ dump()
virtual std::string IWritableCraftDefManager::dump |
( |
| ) |
const |
|
pure virtual |
◆ getCraftRecipes()
◆ getCraftResult()
virtual bool IWritableCraftDefManager::getCraftResult |
( |
CraftInput & |
input, |
|
|
CraftOutput & |
output, |
|
|
std::vector< ItemStack > & |
output_replacements, |
|
|
bool |
decrementInput, |
|
|
IGameDef * |
gamedef |
|
) |
| const |
|
pure virtual |
The main crafting function.
- Parameters
-
input | The input grid. |
output | CraftOutput where the result is placed. |
output_replacements | A vector of ItemStacks where replacements are placed if they cannot be placed in the input. Replacements can be placed in the input if the stack of the replaced item has a count of 1. |
decrementInput | If true, consume or replace input items. |
gamedef | |
- Returns
- true if a result was found, otherwise false.
Implements ICraftDefManager.
Implemented in CCraftDefManager.
Referenced by TestCraft::getDumpedCraftResult().
◆ initHashes()
virtual void IWritableCraftDefManager::initHashes |
( |
IGameDef * |
gamedef | ) |
|
|
pure virtual |
◆ registerCraft()
The documentation for this class was generated from the following file: