mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-07-06 21:36:58 +03:00
Finalize version on reload.
This commit is contained in:
parent
1705832feb
commit
4901985db6
4 changed files with 30 additions and 29 deletions
|
|
@ -137,35 +137,10 @@ void OneSixVersionBuilder::buildInternal(const bool onlyVanilla, const QStringLi
|
|||
} while (0);
|
||||
|
||||
// some final touches
|
||||
finalizeVersion();
|
||||
m_version->finalize();
|
||||
}
|
||||
|
||||
void OneSixVersionBuilder::finalizeVersion()
|
||||
{
|
||||
if (m_version->assets.isEmpty())
|
||||
{
|
||||
m_version->assets = "legacy";
|
||||
}
|
||||
if (m_version->minecraftArguments.isEmpty())
|
||||
{
|
||||
QString toCompare = m_version->processArguments.toLower();
|
||||
if (toCompare == "legacy")
|
||||
{
|
||||
m_version->minecraftArguments = " ${auth_player_name} ${auth_session}";
|
||||
}
|
||||
else if (toCompare == "username_session")
|
||||
{
|
||||
m_version->minecraftArguments =
|
||||
"--username ${auth_player_name} --session ${auth_session}";
|
||||
}
|
||||
else if (toCompare == "username_session_version")
|
||||
{
|
||||
m_version->minecraftArguments = "--username ${auth_player_name} "
|
||||
"--session ${auth_session} "
|
||||
"--version ${profile_name}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void OneSixVersionBuilder::readJsonAndApply(const QJsonObject &obj)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue