mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-07-04 04:16:57 +03:00
NOISSUE change behaviour of the +tweakers patch item
Patch application will either add tweakers, or move them to the end if they are already present. This allows fixing up tweaker order in subsequent version patches.
This commit is contained in:
parent
b88206907e
commit
eba8e61ce9
1 changed files with 11 additions and 4 deletions
|
|
@ -428,12 +428,19 @@ void MinecraftProfile::applyTraits(const QSet<QString>& traits)
|
|||
|
||||
void MinecraftProfile::applyTweakers(const QStringList& tweakers)
|
||||
{
|
||||
// FIXME: check for dupes?
|
||||
// FIXME: does order matter?
|
||||
for (auto tweaker : tweakers)
|
||||
// if the applied tweakers override an existing one, skip it. this effectively moves it later in the sequence
|
||||
QStringList newTweakers;
|
||||
for(auto & tweaker: m_tweakers)
|
||||
{
|
||||
this->m_tweakers += tweaker;
|
||||
if (tweakers.contains(tweaker))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
newTweakers.append(tweaker);
|
||||
}
|
||||
// then just append the new tweakers (or moved original ones)
|
||||
newTweakers += tweakers;
|
||||
m_tweakers = newTweakers;
|
||||
}
|
||||
|
||||
void MinecraftProfile::applyJarMods(const QList<LibraryPtr>& jarMods)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue