mirror of
https://github.com/aimrebirth/tools.git
synced 2026-04-14 17:33:25 +00:00
Update for manager changes.
This commit is contained in:
parent
ea250f11ea
commit
dc8733dd49
2 changed files with 11 additions and 7 deletions
|
|
@ -19,6 +19,7 @@
|
|||
#include <common.h>
|
||||
#include <db.h>
|
||||
|
||||
#include <Polygon4/DataManager/Database.h>
|
||||
#include <Polygon4/DataManager/Localization.h>
|
||||
#include <Polygon4/DataManager/Storage.h>
|
||||
#include <Polygon4/DataManager/Types.h>
|
||||
|
|
@ -295,8 +296,9 @@ int main(int argc, char *argv[])
|
|||
|
||||
fs::current_path(dir_to_lang_dbs);
|
||||
|
||||
auto storage = polygon4::initStorage(db_fn);
|
||||
storage->load();
|
||||
auto storage = polygon4::initStorage();
|
||||
auto database = std::make_unique<polygon4::Database>(db_fn);
|
||||
storage->load(*database, {});
|
||||
kv_resolved = get_kv_resolved(dir_to_lang_dbs, *storage.get());
|
||||
|
||||
// to check correctness
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
#include <objects.h>
|
||||
#include "other.h"
|
||||
|
||||
#include <Polygon4/DataManager/Database.h>
|
||||
#include <Polygon4/DataManager/Storage.h>
|
||||
#include <Polygon4/DataManager/Types.h>
|
||||
#include <primitives/filesystem.h>
|
||||
|
|
@ -328,16 +329,17 @@ int main(int argc, char *argv[])
|
|||
else
|
||||
{
|
||||
bool e = fs::exists(db_path);
|
||||
auto storage = initStorage(db_path.u8string());
|
||||
auto storage = initStorage();
|
||||
auto database = std::make_unique<polygon4::Database>(db_path);
|
||||
if (!e)
|
||||
{
|
||||
storage->create();
|
||||
storage->save();
|
||||
storage->create(*database);
|
||||
storage->save(*database, {});
|
||||
}
|
||||
storage->load();
|
||||
storage->load(*database, {});
|
||||
action([&storage, &mapname](const path &, const auto &m) {write_mmo(storage.get(), m, mapname); });
|
||||
if (inserted_all)
|
||||
storage->save();
|
||||
storage->save(*database, {});
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue