Luanti 5.11.0-dev
 
Loading...
Searching...
No Matches
CraftDefinitionFuel Class Reference

#include <craftdef.h>

+ Inheritance diagram for CraftDefinitionFuel:
+ Collaboration diagram for CraftDefinitionFuel:

Public Member Functions

 CraftDefinitionFuel ()=delete
 
 CraftDefinitionFuel (const std::string &recipe_, float burntime_, const CraftReplacements &replacements_)
 
virtual ~CraftDefinitionFuel ()=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 recipe
 
std::string recipe_name
 
bool hash_inited = false
 
float burntime
 
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
 

Constructor & Destructor Documentation

◆ CraftDefinitionFuel() [1/2]

CraftDefinitionFuel::CraftDefinitionFuel ( )
delete

◆ CraftDefinitionFuel() [2/2]

CraftDefinitionFuel::CraftDefinitionFuel ( const std::string & recipe_,
float burntime_,
const CraftReplacements & replacements_ )

References isGroupRecipeStr(), CraftDefinition::priority, CraftDefinition::PRIORITY_SHAPELESS, CraftDefinition::PRIORITY_SHAPELESS_AND_GROUPS, and recipe_name.

+ Here is the call graph for this function:

◆ ~CraftDefinitionFuel()

virtual CraftDefinitionFuel::~CraftDefinitionFuel ( )
virtualdefault

Member Function Documentation

◆ check()

bool CraftDefinitionFuel::check ( const CraftInput & input,
IGameDef * gamedef ) const
virtual

Implements CraftDefinition.

References CRAFT_METHOD_FUEL, craftGetItemName(), IGameDef::idef(), inputItemMatchesRecipe(), CraftInput::items, CraftInput::method, and recipe.

+ Here is the call graph for this function:

◆ decrementInput()

void CraftDefinitionFuel::decrementInput ( CraftInput & input,
std::vector< ItemStack > & output_replacements,
IGameDef * gamedef ) const
virtual

Implements CraftDefinition.

References craftDecrementOrReplaceInput(), and replacements.

+ Here is the call graph for this function:

◆ dump()

std::string CraftDefinitionFuel::dump ( ) const
virtual

Implements CraftDefinition.

References burntime, CraftReplacements::dump(), recipe, and replacements.

+ Here is the call graph for this function:

◆ getHash()

u64 CraftDefinitionFuel::getHash ( CraftHashType type) const
virtual

Implements CraftDefinition.

References CRAFT_HASH_TYPE_COUNT, CRAFT_HASH_TYPE_ITEM_NAMES, getHashForString(), and recipe_name.

+ Here is the call graph for this function:

◆ getInput()

CraftInput CraftDefinitionFuel::getInput ( const CraftOutput & output,
IGameDef * gamedef ) const
virtual

Implements CraftDefinition.

References burntime, CRAFT_METHOD_COOKING, craftGetItems(), and recipe.

+ Here is the call graph for this function:

◆ getName()

std::string CraftDefinitionFuel::getName ( ) const
virtual

Implements CraftDefinition.

◆ getOutput()

CraftOutput CraftDefinitionFuel::getOutput ( const CraftInput & input,
IGameDef * gamedef ) const
virtual

Implements CraftDefinition.

References burntime.

◆ initHash()

void CraftDefinitionFuel::initHash ( IGameDef * gamedef)
virtual

Implements CraftDefinition.

References CRAFT_HASH_TYPE_COUNT, CRAFT_HASH_TYPE_ITEM_NAMES, craftGetItemName(), hash_inited, CraftDefinition::hash_type, isGroupRecipeStr(), recipe, and recipe_name.

+ Here is the call graph for this function:

Member Data Documentation

◆ burntime

float CraftDefinitionFuel::burntime
private

Referenced by dump(), getInput(), and getOutput().

◆ hash_inited

bool CraftDefinitionFuel::hash_inited = false
private

Referenced by initHash().

◆ recipe

std::string CraftDefinitionFuel::recipe
private

Referenced by check(), dump(), getInput(), and initHash().

◆ recipe_name

std::string CraftDefinitionFuel::recipe_name
private

◆ replacements

CraftReplacements CraftDefinitionFuel::replacements
private

Referenced by decrementInput(), and dump().


The documentation for this class was generated from the following files: