1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-23 01:59:43 +01: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:
Misa 2020-04-15 12:11:33 -07:00 committed by Ethan Lee
parent be64d4f704
commit 119d2ad25f

View file

@ -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");