Create stocksettings directory on startup if necessary

develop
lethosor 2014-12-03 16:09:39 -05:00 committed by Casey Link
parent 1f1780cae9
commit 1525823948
1 changed files with 10 additions and 0 deletions

@ -5,6 +5,7 @@
#include "DataFuncs.h"
#include "LuaTools.h"
#include "modules/Filesystem.h"
#include "../uicommon.h"
@ -97,9 +98,18 @@ DFhackCExport command_result plugin_init ( color_ostream &out, std::vector <Plug
)
);
}
std::cerr << "world: " << sizeof ( df::world ) << " ui: " << sizeof ( df::ui )
<< " b_stock: " << sizeof ( building_stockpilest ) << endl;
if (!Filesystem::isdir("stocksettings"))
{
if (!Filesystem::mkdir("stocksettings"))
{
out.printerr("stockpiles: could not create stocksettings directory!\n");
return CR_FAILURE;
}
}
// ViewscreenStocks::reset();
return CR_OK;