Forge version list implementation. Needs integration and testing.
This commit is contained in:
parent
7721c57e5e
commit
d38b90530b
37 changed files with 835 additions and 219 deletions
|
@ -214,6 +214,13 @@ bool OneSixInstance::shouldUpdate() const
|
|||
return true;
|
||||
}
|
||||
|
||||
bool OneSixInstance::versionIsCustom()
|
||||
{
|
||||
QString verpath_custom = PathCombine(instanceRoot(), "custom.json");
|
||||
QFile versionfile(verpath_custom);
|
||||
return versionfile.exists();
|
||||
}
|
||||
|
||||
QString OneSixInstance::currentVersionId() const
|
||||
{
|
||||
return intendedVersionId();
|
||||
|
@ -224,6 +231,13 @@ bool OneSixInstance::reloadFullVersion()
|
|||
I_D(OneSixInstance);
|
||||
|
||||
QString verpath = PathCombine(instanceRoot(), "version.json");
|
||||
{
|
||||
QString verpath_custom = PathCombine(instanceRoot(), "custom.json");
|
||||
QFile versionfile(verpath_custom);
|
||||
if(versionfile.exists())
|
||||
verpath = verpath_custom;
|
||||
}
|
||||
|
||||
QFile versionfile(verpath);
|
||||
if(versionfile.exists() && versionfile.open(QIODevice::ReadOnly))
|
||||
{
|
||||
|
@ -264,7 +278,12 @@ bool OneSixInstance::menuActionEnabled ( QString action_name ) const
|
|||
|
||||
QString OneSixInstance::getStatusbarDescription()
|
||||
{
|
||||
return "One Six : " + intendedVersionId();
|
||||
QString descr = "One Six : " + intendedVersionId();
|
||||
if(versionIsCustom())
|
||||
{
|
||||
descr + " (custom)";
|
||||
}
|
||||
return descr;
|
||||
}
|
||||
|
||||
QString OneSixInstance::loaderModsDir() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue