2012-06-14 09:06:06 -04:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class cItem;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class cFurnaceRecipe
|
|
|
|
{
|
|
|
|
public:
|
2013-06-16 16:24:07 -04:00
|
|
|
cFurnaceRecipe(void);
|
2012-06-14 09:06:06 -04:00
|
|
|
~cFurnaceRecipe();
|
|
|
|
|
2013-06-16 16:24:07 -04:00
|
|
|
void ReloadRecipes(void);
|
2012-06-14 09:06:06 -04:00
|
|
|
|
|
|
|
struct Fuel
|
|
|
|
{
|
2013-06-16 16:24:07 -04:00
|
|
|
cItem * In;
|
|
|
|
int BurnTime; ///< How long this fuel burns, in ticks
|
2012-06-14 09:06:06 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
struct Recipe
|
|
|
|
{
|
2013-06-16 16:24:07 -04:00
|
|
|
cItem * In;
|
|
|
|
cItem * Out;
|
|
|
|
int CookTime; ///< How long this recipe takes to smelt, in ticks
|
2012-06-14 09:06:06 -04:00
|
|
|
};
|
2013-06-16 16:24:07 -04:00
|
|
|
|
|
|
|
/// Returns a recipe for the specified input, NULL if no recipe found
|
|
|
|
const Recipe * GetRecipeFrom(const cItem & a_Ingredient) const;
|
|
|
|
|
|
|
|
/// Returns the amount of time that the specified fuel burns, in ticks
|
|
|
|
int GetBurnTime(const cItem & a_Fuel) const;
|
2012-06-14 09:06:06 -04:00
|
|
|
|
|
|
|
private:
|
2013-06-16 16:24:07 -04:00
|
|
|
void ClearRecipes(void);
|
2012-06-14 09:06:06 -04:00
|
|
|
|
|
|
|
struct sFurnaceRecipeState;
|
2013-06-16 16:24:07 -04:00
|
|
|
sFurnaceRecipeState * m_pState;
|
2012-06-14 09:06:06 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|