1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-22 09:39:43 +01:00

Make foundtrinket() be accurate in custommode

Previously, if it was called in a custom level, it would say "out of
Twenty" no matter what, even if the level had zero trinkets. This commit
fixes that.
This commit is contained in:
Info Teddy 2020-01-23 06:50:09 -08:00 committed by Ethan Lee
parent 37507c147f
commit a02d776b00

View file

@ -1892,7 +1892,16 @@ void scriptclass::run( KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map,
dwgfx.addline("You have found a shiny trinket!");
dwgfx.textboxcenterx();
dwgfx.createtextbox(" " + help.number(game.trinkets) + " out of Twenty ", 50, 135, 174, 174, 174);
std::string usethisnum;
if (map.custommode)
{
usethisnum = help.number(map.customtrinkets);
}
else
{
usethisnum = "Twenty";
}
dwgfx.createtextbox(" " + help.number(game.trinkets) + " out of " + usethisnum + " ", 50, 135, 174, 174, 174);
dwgfx.textboxcenterx();
if (!game.backgroundtext)