mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Condense indentation levels of else-if chain in "play" menu
Previously, the code looked something like:
else { if (...) {...} else { if (...) {...} else { etc. } }
And kept indenting every time there was an else-if.
This commit puts all else-ifs on the same indentation level, so it
doesn't slowly push the code to the right.
This commit is contained in:
@@ -6923,30 +6923,24 @@ void Game::createmenu( std::string t )
|
|||||||
createmenu("unlocknodeathmode");
|
createmenu("unlocknodeathmode");
|
||||||
savemystats = true;
|
savemystats = true;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
//Alright then! Flip mode?
|
//Alright then! Flip mode?
|
||||||
if (unlock[5] && !unlocknotify[18])
|
else if (unlock[5] && !unlocknotify[18])
|
||||||
{
|
{
|
||||||
unlock[18] = true;
|
unlock[18] = true;
|
||||||
unlocknotify[18] = true;
|
unlocknotify[18] = true;
|
||||||
createmenu("unlockflipmode");
|
createmenu("unlockflipmode");
|
||||||
savemystats = true;
|
savemystats = true;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
//What about the intermission levels?
|
//What about the intermission levels?
|
||||||
if (unlock[7] && !unlocknotify[16])
|
else if (unlock[7] && !unlocknotify[16])
|
||||||
{
|
{
|
||||||
unlock[16] = true;
|
unlock[16] = true;
|
||||||
unlocknotify[16] = true;
|
unlocknotify[16] = true;
|
||||||
createmenu("unlockintermission");
|
createmenu("unlockintermission");
|
||||||
savemystats = true;
|
savemystats = true;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
//ok, secret lab! no notification, but test:
|
//ok, secret lab! no notification, but test:
|
||||||
if (unlock[8])
|
else if (unlock[8])
|
||||||
{
|
{
|
||||||
createmenu("playsecretlab");
|
createmenu("playsecretlab");
|
||||||
}
|
}
|
||||||
@@ -6961,9 +6955,6 @@ void Game::createmenu( std::string t )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (t == "unlocktimetrial" || t == "unlocktimetrials")
|
else if (t == "unlocktimetrial" || t == "unlocktimetrials")
|
||||||
{
|
{
|
||||||
option("continue");
|
option("continue");
|
||||||
|
|||||||
Reference in New Issue
Block a user