SaveTool: prepare for the better import/export system.
This commit is contained in:
parent
ed0c4a73bb
commit
13d09e4aa0
2 changed files with 24 additions and 0 deletions
|
@ -95,6 +95,10 @@ SaveTool::SaveTool(const Arguments& arguments):
|
||||||
|
|
||||||
_backupsDir = Utility::Directory::join(Utility::Directory::path(Utility::Directory::executableLocation()), "backups");
|
_backupsDir = Utility::Directory::join(Utility::Directory::path(Utility::Directory::executableLocation()), "backups");
|
||||||
_stagingDir = Utility::Directory::join(Utility::Directory::path(Utility::Directory::executableLocation()), "staging");
|
_stagingDir = Utility::Directory::join(Utility::Directory::path(Utility::Directory::executableLocation()), "staging");
|
||||||
|
_armouryDir = Utility::Directory::join(Utility::Directory::path(Utility::Directory::executableLocation()), "armoury");
|
||||||
|
_armoursDir = Utility::Directory::join(_armouryDir, "armours");
|
||||||
|
_weaponsDir = Utility::Directory::join(_armouryDir, "weapons");
|
||||||
|
_stylesDir = Utility::Directory::join(_armouryDir, "styles");
|
||||||
|
|
||||||
if(!Utility::Directory::exists(_backupsDir)) {
|
if(!Utility::Directory::exists(_backupsDir)) {
|
||||||
Utility::Directory::mkpath(_backupsDir);
|
Utility::Directory::mkpath(_backupsDir);
|
||||||
|
@ -104,6 +108,22 @@ SaveTool::SaveTool(const Arguments& arguments):
|
||||||
Utility::Directory::mkpath(_stagingDir);
|
Utility::Directory::mkpath(_stagingDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!Utility::Directory::exists(_armouryDir)) {
|
||||||
|
Utility::Directory::mkpath(_armouryDir);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!Utility::Directory::exists(_armoursDir)) {
|
||||||
|
Utility::Directory::mkpath(_armoursDir);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!Utility::Directory::exists(_weaponsDir)) {
|
||||||
|
Utility::Directory::mkpath(_weaponsDir);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!Utility::Directory::exists(_stylesDir)) {
|
||||||
|
Utility::Directory::mkpath(_stylesDir);
|
||||||
|
}
|
||||||
|
|
||||||
if(!findGameDataDirectory()) {
|
if(!findGameDataDirectory()) {
|
||||||
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Error initialising the app", _lastError.c_str(), window());
|
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Error initialising the app", _lastError.c_str(), window());
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
|
|
|
@ -212,6 +212,10 @@ class SaveTool: public Platform::Sdl2Application, public efsw::FileWatchListener
|
||||||
|
|
||||||
std::string _backupsDir;
|
std::string _backupsDir;
|
||||||
std::string _stagingDir;
|
std::string _stagingDir;
|
||||||
|
std::string _armouryDir;
|
||||||
|
std::string _armoursDir;
|
||||||
|
std::string _weaponsDir;
|
||||||
|
std::string _stylesDir;
|
||||||
|
|
||||||
enum class GameState : UnsignedByte {
|
enum class GameState : UnsignedByte {
|
||||||
Unknown, NotRunning, Running
|
Unknown, NotRunning, Running
|
||||||
|
|
Loading…
Reference in a new issue