summaryrefslogtreecommitdiffstats
path: root/source/cFurnaceRecipe.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-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 )