Things... and stuff... with 1.6 modding. Maybe.
This commit is contained in:
parent
930b07afd4
commit
c2c7293083
7 changed files with 124 additions and 8 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue