Things... and stuff... with 1.6 modding. Maybe.

This commit is contained in:
Petr Mrázek
2013-09-20 01:21:48 +02:00
parent 930b07afd4
commit c2c7293083
7 changed files with 124 additions and 8 deletions

View File

@ -226,6 +226,30 @@ QString OneSixInstance::currentVersionId() const
return intendedVersionId();
}
bool OneSixInstance::customizeVersion()
{
if(!versionIsCustom())
{
auto pathCustom = PathCombine(instanceRoot(), "custom.json");
auto pathOrig = PathCombine(instanceRoot(), "version.json");
QFile::copy(pathOrig, pathCustom);
return reloadFullVersion();
}
else return true;
}
bool OneSixInstance::revertCustomVersion()
{
if(versionIsCustom())
{
auto path = PathCombine(instanceRoot(), "custom.json");
QFile::remove(path);
return reloadFullVersion();
}
else return true;
}
bool OneSixInstance::reloadFullVersion()
{
I_D(OneSixInstance);