1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-17 00:07:41 +02:00

Merge remote-tracking branch 'remotes/origin/develop' into feature/VCMIMapFormat1

Conflicts:
	lib/VCMI_lib.cbp
	lib/filesystem/CZipLoader.cpp
	lib/filesystem/CZipLoader.h
	lib/mapObjects/CGTownInstance.cpp
This commit is contained in:
AlexVinS
2016-02-04 10:27:51 +03:00
103 changed files with 1562 additions and 696 deletions

View File

@ -2,6 +2,7 @@
#include "CModHandler.h"
#include "mapObjects/CObjectClassesHandler.h"
#include "JsonNode.h"
#include "filesystem/FileStream.h"
#include "filesystem/Filesystem.h"
#include "filesystem/AdapterLoaders.h"
#include "filesystem/CFilesystemLoader.h"
@ -554,7 +555,7 @@ void CModHandler::loadConfigFromFile (std::string name)
std::string paths;
for(auto& p : CResourceHandler::get()->getResourceNames(ResourceID("config/" + name)))
{
paths += p + ", ";
paths += p.string() + ", ";
}
paths = paths.substr(0, paths.size() - 2);
logGlobal->debugStream() << "Loading hardcoded features settings from [" << paths << "], result:";
@ -902,7 +903,7 @@ void CModHandler::afterLoad()
}
modSettings["core"] = coreMod.saveLocalData();
std::ofstream file(*CResourceHandler::get()->getResourceName(ResourceID("config/modSettings.json")), std::ofstream::trunc);
FileStream file(*CResourceHandler::get()->getResourceName(ResourceID("config/modSettings.json")), std::ofstream::out | std::ofstream::trunc);
file << modSettings;
}