97eda34a94
Furnaces now smelt the correct number of items. Furnaces store their contents in a cItemGrid. Furnace window is updated with correct items and progressbars. Furnace recipes now use ticks instead of milliseconds. Furnaces save and load their state completely, not missing a smelt operation. Hoppers take items out of furnaces. Dropped the cSlotAreaDropSpenser class, replaced it with generic cSlotAreaItemGrid git-svn-id: http://mc-server.googlecode.com/svn/trunk@1601 0a769ca7-a7f5-676a-18bf-c427514a06d6
51 lines
715 B
C++
51 lines
715 B
C++
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
|
|
class cItem;
|
|
|
|
|
|
|
|
|
|
|
|
class cFurnaceRecipe
|
|
{
|
|
public:
|
|
cFurnaceRecipe(void);
|
|
~cFurnaceRecipe();
|
|
|
|
void ReloadRecipes(void);
|
|
|
|
struct Fuel
|
|
{
|
|
cItem * In;
|
|
int BurnTime; ///< How long this fuel burns, in ticks
|
|
};
|
|
|
|
struct Recipe
|
|
{
|
|
cItem * In;
|
|
cItem * Out;
|
|
int CookTime; ///< How long this recipe takes to smelt, in ticks
|
|
};
|
|
|
|
/// 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;
|
|
|
|
private:
|
|
void ClearRecipes(void);
|
|
|
|
struct sFurnaceRecipeState;
|
|
sFurnaceRecipeState * m_pState;
|
|
};
|
|
|
|
|
|
|
|
|