summaryrefslogtreecommitdiffstats
path: root/source/cFurnaceRecipe.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-06-04 14:08:20 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-06-04 14:08:20 +0200
commitb355bdeccecf727d30e48634df9b5d424db570bc (patch)
tree00489a1317e6ad22a28698f24bd9935160257789 /source/cFurnaceRecipe.cpp
parentFixed MSVC2010 projects for new zlib (diff)
downloadcuberite-b355bdeccecf727d30e48634df9b5d424db570bc.tar
cuberite-b355bdeccecf727d30e48634df9b5d424db570bc.tar.gz
cuberite-b355bdeccecf727d30e48634df9b5d424db570bc.tar.bz2
cuberite-b355bdeccecf727d30e48634df9b5d424db570bc.tar.lz
cuberite-b355bdeccecf727d30e48634df9b5d424db570bc.tar.xz
cuberite-b355bdeccecf727d30e48634df9b5d424db570bc.tar.zst
cuberite-b355bdeccecf727d30e48634df9b5d424db570bc.zip
Diffstat (limited to 'source/cFurnaceRecipe.cpp')
-rw-r--r--source/cFurnaceRecipe.cpp29
1 files changed, 27 insertions, 2 deletions
diff --git a/source/cFurnaceRecipe.cpp b/source/cFurnaceRecipe.cpp
index 321253422..b17ec51cd 100644
--- a/source/cFurnaceRecipe.cpp
+++ b/source/cFurnaceRecipe.cpp
@@ -7,30 +7,51 @@
#include <fstream>
#include <sstream>
+
+
+
+
typedef std::list< cFurnaceRecipe::Recipe > RecipeList;
typedef std::list< cFurnaceRecipe::Fuel > FuelList;
+
+
+
+
+
struct cFurnaceRecipe::sFurnaceRecipeState
{
RecipeList Recipes;
FuelList Fuel;
};
+
+
+
+
cFurnaceRecipe::cFurnaceRecipe()
: m_pState( new sFurnaceRecipeState )
{
ReloadRecipes();
}
+
+
+
+
cFurnaceRecipe::~cFurnaceRecipe()
{
ClearRecipes();
delete m_pState;
}
+
+
+
+
void cFurnaceRecipe::ReloadRecipes()
{
ClearRecipes();
- LOG("--Loading furnace recipes--");
+ LOG("-- Loading furnace recipes --");
std::ifstream f;
char a_File[] = "furnace.txt";
@@ -152,9 +173,13 @@ void cFurnaceRecipe::ReloadRecipes()
}
LOG("Got %i furnace recipes, and %i fuels.", m_pState->Recipes.size(), m_pState->Fuel.size() );
- LOG("--Done loading furnace recipes--");
+ LOG("-- Done loading furnace recipes --");
}
+
+
+
+
void cFurnaceRecipe::ClearRecipes()
{
for( RecipeList::iterator itr = m_pState->Recipes.begin(); itr != m_pState->Recipes.end(); ++itr )