Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
CraftDefinitionToolRepair Class Reference

#include <craftdef.h>

+ Inheritance diagram for CraftDefinitionToolRepair:
+ Collaboration diagram for CraftDefinitionToolRepair:

Public Member Functions

 CraftDefinitionToolRepair ()=delete
 
 CraftDefinitionToolRepair (float additional_wear_)
 
virtual ~CraftDefinitionToolRepair ()=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

float additional_wear = 0.0f
 

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

◆ CraftDefinitionToolRepair() [1/2]

CraftDefinitionToolRepair::CraftDefinitionToolRepair ( )
delete

◆ CraftDefinitionToolRepair() [2/2]

CraftDefinitionToolRepair::CraftDefinitionToolRepair ( float additional_wear_)

◆ ~CraftDefinitionToolRepair()

virtual CraftDefinitionToolRepair::~CraftDefinitionToolRepair ( )
virtualdefault

Member Function Documentation

◆ check()

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

Implements CraftDefinition.

References additional_wear, CRAFT_METHOD_NORMAL, craftToolRepair(), ItemStack::empty(), CraftInput::items, and CraftInput::method.

+ Here is the call graph for this function:

◆ decrementInput()

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

Implements CraftDefinition.

References craftDecrementInput().

+ Here is the call graph for this function:

◆ dump()

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

Implements CraftDefinition.

References additional_wear.

◆ getHash()

virtual u64 CraftDefinitionToolRepair::getHash ( CraftHashType type) const
inlinevirtual

Implements CraftDefinition.

◆ getInput()

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

◆ getName()

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

Implements CraftDefinition.

◆ getOutput()

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

Implements CraftDefinition.

References additional_wear, craftToolRepair(), ItemStack::empty(), ItemStack::getItemString(), and CraftInput::items.

+ Here is the call graph for this function:

◆ initHash()

virtual void CraftDefinitionToolRepair::initHash ( IGameDef * gamedef)
inlinevirtual

Member Data Documentation

◆ additional_wear

float CraftDefinitionToolRepair::additional_wear = 0.0f
private

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


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